summaryrefslogtreecommitdiff
path: root/doc/tutorial/StringOper.gf
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2005-12-18 21:26:21 +0000
committeraarne <aarne@cs.chalmers.se>2005-12-18 21:26:21 +0000
commit6398140d0ac21ad05a0c595b77007631cd5e1265 (patch)
treefae648d7e9e344fa850be37f1eb0b3b29e8f17e6 /doc/tutorial/StringOper.gf
parenta205829623ea7b928c84e56cd6453148f123a3d5 (diff)
new tutorial example
Diffstat (limited to 'doc/tutorial/StringOper.gf')
-rw-r--r--doc/tutorial/StringOper.gf10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/tutorial/StringOper.gf b/doc/tutorial/StringOper.gf
new file mode 100644
index 000000000..803d957f0
--- /dev/null
+++ b/doc/tutorial/StringOper.gf
@@ -0,0 +1,10 @@
+resource StringOper = {
+ oper
+ SS : Type = {s : Str} ;
+
+ ss : Str -> SS = \x -> {s = x} ;
+
+ cc : SS -> SS -> SS = \x,y -> ss (x.s ++ y.s) ;
+
+ prefix : Str -> SS -> SS = \p,x -> ss (p ++ x.s) ;
+} \ No newline at end of file