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