diff tests/nest.ur @ 453:787d4931fb07

Almost have that nested save function compiling
author Adam Chlipala <adamc@hcoop.net>
date Sat, 01 Nov 2008 21:19:43 -0400
parents 07f6576aeb0a
children
line wrap: on
line diff
--- a/tests/nest.ur	Sat Nov 01 17:19:12 2008 -0400
+++ b/tests/nest.ur	Sat Nov 01 21:19:43 2008 -0400
@@ -45,7 +45,26 @@
         page3
     end
 
-datatype list t = Nil | Cons of t * list t
+fun add2 (x : int) (y : int) =
+    let
+        fun add3 () = x + y
+    in
+        add3
+    end
+
+fun add3 (x : int) =
+    let
+        fun add2 (y : int) =
+            let
+                fun add1 (z : int) = x + y + z
+            in
+                add1
+            end
+    in
+        add2
+    end
+
+(*datatype list t = Nil | Cons of t * list t
 
 fun length (t ::: Type) (ls : list t) =
     let
@@ -57,3 +76,4 @@
         length' ls 0
     end
 
+*)