exp ::= var | (lambda (var) exp) | (exp exp)
Check out
http://matt.might.net/articles/church-encodings-demo-in-sche...
To see how to build numbers, booleans, lists, conditionals and recursion out of pure lambdas.
Even cooler is that these tricks work in languages like JavaScript too:
http://matt.might.net/articles/implementation-of-recursive-f...
exp ::= var | (lambda (var) exp) | (exp exp)
Check out
http://matt.might.net/articles/church-encodings-demo-in-sche...
To see how to build numbers, booleans, lists, conditionals and recursion out of pure lambdas.
Even cooler is that these tricks work in languages like JavaScript too:
http://matt.might.net/articles/implementation-of-recursive-f...