tweaked arithmetic
[lambda.git] / arithmetic.mdwn
index cac56f2..bc15ae8 100644 (file)
@@ -44,6 +44,7 @@ Here are a bunch of pre-tested operations for the untyped lambda calculus. In so
        let map = \f lst. lst (\h sofar. make_list (f h) sofar) empty  in
        let filter = \f lst. lst (\h sofar. f h (make_list h sofar) sofar) empty  in ; or
        let filter = \f lst. lst (\h. f h (make_list h) I) empty  in
+       let reverse = \lst. lst (\h t. t make_list (\f n. f h n)) empty  in
        
 
        ; version 1 lists
@@ -201,7 +202,7 @@ Here are a bunch of pre-tested operations for the untyped lambda calculus. In so
        ; Rosenbloom's fixed point combinator
        let Y = \f. (\h. f (h h)) (\h. f (h h)) in
        ; Turing's fixed point combinator
-       let Z = (\u f. f (u u f)) (\u f. f (u u f))  in
+       let Theta = (\u f. f (u u f)) (\u f. f (u u f))  in
 
 
        ; length for version 1 lists
@@ -218,7 +219,7 @@ Here are a bunch of pre-tested operations for the untyped lambda calculus. In so
 
 
 
-       fact Z 3  ; returns 6
+       fact Theta 3  ; returns 6
 
 
 <!--