X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=arithmetic.mdwn;h=d27248754b7832b7c5edadb702823f11a35c3457;hp=fc7249f6bfa8ac73fc468506d1df556ad4628909;hb=0dd9b48d6a2e74d618a99a101f0122f4d7c076fb;hpb=af844d6cdbd502a2fe9aa0756ab83a84ff66909d diff --git a/arithmetic.mdwn b/arithmetic.mdwn index fc7249f6..d2724875 100644 --- a/arithmetic.mdwn +++ b/arithmetic.mdwn @@ -39,7 +39,7 @@ Here are a bunch of pre-tested operations for the untyped lambda calculus. In so let head = \lst. lst (\h sofar. h) junk in let tail = \lst. (\shift lst. lst shift (make_pair empty junk) get_2nd) ; where shift is - (\h p. p (\t y. make_pair (make-list h t) t)) in + (\h p. p (\t y. make_pair (make_list h t) t)) in let length = \lst. lst (\h sofar. succ sofar) 0 in 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 @@ -198,10 +198,10 @@ Here are a bunch of pre-tested operations for the untyped lambda calculus. In so )) in - ; Curry's fixed point combinator + ; 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 +218,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 + +