The lambda calculus proposes an – at first glance – ideosynchratic definition for numbers. A number is function that takes two arguments:
— a function to call repeatedly
— an argument for the first call
We will elaborate further on why this definition for numbers is indeed meaningful. Let us first try to implement this in PHP. The implementation is not that straightforward, but it is possible.