projects
/
lambda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dd9b48
)
tweaked arithmetic
author
Jim Pryor
<profjim@jimpryor.net>
Thu, 30 Sep 2010 18:31:25 +0000
(14:31 -0400)
committer
Jim Pryor
<profjim@jimpryor.net>
Thu, 30 Sep 2010 18:31:25 +0000
(14:31 -0400)
Signed-off-by: Jim Pryor <profjim@jimpryor.net>
arithmetic.mdwn
patch
|
blob
|
history
diff --git
a/arithmetic.mdwn
b/arithmetic.mdwn
index
d272487
..
bc15ae8
100644
(file)
--- 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