Thought I'd give this a try using plain lambda calculus. The notation is:
λx.t
λx.(λy.t)
λx y.t
MN
MNO
(MN)O
0 = λf x.x succ = λn f x. f (n f x) add = λm n f x. m f (n f x) mul = λm n f x. m (n f) x alg = λn i s. add n (mul i s)
Example 1:
2 = succ (succ 0) 5 = succ (add 2 2) 10 = add 5 5 alg 2 5 10 --> λf x.f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f(f x)))))))))))))))))))))))))))))))))))))))))))))))))))
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thought I'd give this a try using plain lambda calculus. The notation is:
λx.t
= Function taking x as an argument and producing the expression t. Can simplifyλx.(λy.t)
->λx y.t
MN
= Apply N to MMNO
=(MN)O
Example 1: