tweaked arithmetic
authorJim Pryor <profjim@jimpryor.net>
Thu, 30 Sep 2010 18:50:10 +0000 (14:50 -0400)
committerJim Pryor <profjim@jimpryor.net>
Thu, 30 Sep 2010 18:50:10 +0000 (14:50 -0400)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
arithmetic.mdwn

index 7812755..bc531ec 100644 (file)
@@ -49,8 +49,8 @@ Here are a bunch of pre-tested operations for the untyped lambda calculus. In so
        let singleton = \x f z. f x z  in
        let reverse = \lst. lst (\h sofar. sofar make_list (singleton h)) empty  in
        let zip = \left right. left (\h sofar. sofar (\x y. isempty y
-                                                                       sofar
-                                                                       (make_pair (make_list () x) (tail y))
+                                                                               sofar
+                                                                               (make_pair (make_list (\u v. head y (u v) h) x) (tail y))
                                                                        )
                                                                        (make_pair empty (map right (\h u v. u v h)))
                                                                )