(Non-negative) integers
Here’s a scheme for representing non-negative integers
- 0 ? ?f ? ?x ? x
- 1 ? ?f ? ?x ? f x
- 2 ? ?f ? ?x ? f (f x)
- 3 ? ?f ? ?x ? f (f (f x))
That is, every time we see ?f ? ?x ? f (f x), we think “Oh, that’s 2”
- If you prefer to “uncurry” you can think of this as ?f,x ? f (f x),
You can think of f as “increment by 1”