Skip to content

Instantly share code, notes, and snippets.

@rsp
Last active November 6, 2017 05:13
Show Gist options
  • Save rsp/9b42424e94d2bbf669b951873785dd8d to your computer and use it in GitHub Desktop.
Save rsp/9b42424e94d2bbf669b951873785dd8d to your computer and use it in GitHub Desktop.
Language Wars - Church numerals - untyped lambda calculus
suc = λa.λb.λc.b (a b c)
add = λa.λb.λc.λd.a c (b c d)
mul = λa.λb.λc.a (b c)
exp = λa.λb.b a
pre = λa.λb.λc.a (λd.λe.e (d b)) (λf.c) (λg.g)
sub = λa.λb.b pre a
@rsp
Copy link
Author

rsp commented Nov 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment