A Church integer is a representation of integers as functions, invented by Alonzo Church. An integer is represented as a higher-order function, which applies a given function to a given expression times.
For example, in the programming language Haskell, a function that returns a particular Church integer might be
The transformation from a Church integer to an integer might be
unchurch n = n (+1) 0
Thus we can generate the integers–the (+1) function would be applied to an initial value of times, yielding the ordinary integer .
|Date of creation||2013-03-22 12:32:31|
|Last modified on||2013-03-22 12:32:31|
|Last modified by||mathcam (2727)|