X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=arithmetic.mdwn;h=bc15ae8de777a3ad40fe126cbe7500f02edd4890;hp=d27248754b7832b7c5edadb702823f11a35c3457;hb=cbb48495bd8cd6cdcbebd1bcd8c3051148c8b0a6;hpb=0dd9b48d6a2e74d618a99a101f0122f4d7c076fb diff --git a/arithmetic.mdwn b/arithmetic.mdwn index d2724875..bc15ae8d 100644 --- a/arithmetic.mdwn +++ b/arithmetic.mdwn @@ -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