From 6398140d0ac21ad05a0c595b77007631cd5e1265 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 18 Dec 2005 21:26:21 +0000 Subject: new tutorial example --- doc/tutorial/StringOper.gf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 doc/tutorial/StringOper.gf (limited to 'doc/tutorial/StringOper.gf') 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 -- cgit v1.2.3