Ok, the parameter names are different, but the functionality is identical! Both ZERO and FALSE brainlessly return their second parameter unmodified.

This now provides us with a (possibly unexpected) way to demonstrate that it is far more than simply computing convention to evaluate Boolean false to zero – they are in fact functionally indistinguishable.

The only circumstance under which a quantity function will ignore its transformation function is when its magnitude is zero, and any non-zero quantity function will always apply its transform function some number of times to the start value.

Therefore, we can get a quantity function to reveal its magnitude by passing it a transformation function that, if called, will always return FALSE. We can pass a starting value of TRUE knowing that this will be returned only when the quantity function has a magnitude of zero.

Now that we have these tools available to us, we can start to look at arithmetic operations such as division and modulus. What makes these operations harder to implement is not only that they need to perform a SUBTRACT operation an unknown number of times, they must also be defined recursively.

I know I’ve been cheating slightly by assigning names such as TRUE, ZERO and MULTIPLY to our function definitions, but this is to account for our severely limited human ability to interpret long expressions. Really, names such as ZERO and MULTIPLY behave as macros that are substituted at runtime for the functions they represent.

Here, we also run up against another problem. Any recursively defined function must be able to make reference to itself; but if we create a DIV function that refers to itself directly by name, then we have broken our rule that functions may not directly refer to themselves by name.

At first, you might think this arbitrary restriction requires us to perform some pointless mental gymnastics simply to overcome our own self-imposed hurdles. Whilst this might be true from one particular perspective, from the wider perspective of wanting understanding the nature of computation, overcoming this hurdle leads us to an understanding of one of the most important constructs in functional programming – the Y-combinator.