- The function `three' expects one argument symbolized by `f' in it's definition. `f' is supposed to be a function taking one argument symbolized by `x'.
- The abstraction `apples' is a function taking one argument and can therefore be synthesized with `three', or in other words `three' can be invoked with `apples' as an argument.
- The result of this synthesis or function call is the no-name
function taking one argument symbolized by `x'.
^{} - In other words our original expression `(three apples)' would not return to us our desired apples but another abstraction instead that has to be synthesized with a basket (symbolized by `x') before we get the basket filled with three apples (if the basket was empty at the beginning).
- We get three apples because the function `f' was invoked three times with the basket as an argument as returned from the previous function call.
- To receive our desired apples finally we have to change our
original expression into the following one:
*((three apples) basket)* - We would like to leave it up to readers to explain to
themselves why the
*following expression*would**not**be**correct**and therefore would not result in basket filled with apples:*((three (apples basket))*

As interesting as these 'Church Numerals' are, readers might still ask the question `Why bother with them?' if they are not needed later in any practical programming work (Java, C, C++, not even Lisp and Scheme).

From the educational viewpoint these Church Numerals are extremely
important however, because they make us very quickly familiar with
the **core of functional programming**:
*functions have the same status as data*,.

- they can be passed as arguments,
- they can be returned by functions, and
- new functions can be created on the fly.

Following the outlined approach above we can define the following abstractions:

Georg P. Loczewski 2004-03-05