λ calculus is a universal model of computation from the 1930s that treats functions anonymously. It can be typed or untyped. Some examples include the identity function λx· x and function application (λx· x)y = y. The document then provides examples of Church encodings for booleans, numbers, subtraction, division/modulus, lists with operations like map and fold, and generating the FizzBuzz sequence in this functional style.
18. Lists
CONS = { xs -> { x ->
PAIR(FALSE)(PAIR(x)(xs))
} }
RANGE = { upto ->
upto({ a -> CONS(a)(PREDECESSOR(CAR(a))) })(CONS(EMPTY)(upto))
}
19. Lists
B = TEN
F = ELEVEN
I = TWELVE
U = THIRTEEN
Z = FOURTEEN
FIZZ = CONS(CONS(CONS(CONS(EMPTY)(Z))(Z))(I))(F)
BUZZ = CONS(CONS(CONS(CONS(EMPTY)(Z))(Z))(U))(B)
FIZZBUZZ = CONS(CONS(CONS(CONS(BUZZ)(Z))(Z))(I))(F)
29. References
Church encoding
https://en.wikipedia.org/wiki/Church_encoding
Programming with nothing by Tom Stuart
https://codon.com/programming-with-nothing
On Understanding Data Abstraction, Revisited by William R. CooK
http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf
Ruby Conf 12 - Y Not- Adventures in Functional Programming by Jim Weirich
https://www.youtube.com/watch?v=FITJMJjASUs