Assume we have a programming language that doesn’t support numbers or booleans: a lambda is the only value it provides.
Church numerals use lambdas to create a representation of numbers. The idea is closely related to the functional representation of natural numbers, i.e. to have a natural number representing “zero” and a function “succ” that returns the successor of the natural number it was given.
(define zero (lambda (f) (lambda (x) x)))
(define (add-1 n)
(lambda (f) (lambda (x) (f ((n f) x)))))
If I have another lambda
(define pluss4 (lambda(x) (+ x 4))
I can test it like: (pluss4 0)
and I see that answer is 4
How to test Church numerals and see some result?