Even or odd: Difference between revisions
m
→{{header|Binary Lambda Calculus}}
imported>Tromp |
|||
Line 1,257:
In lambda calculus, the oddness of a given church numeral n can be computed as n applications of <code>not</code> to <code>false</code>: <code>\n. n (\b\x\y. b y x) (\x\y.y)</code>, which in BLC is
<
To compute the evenness, one need only replace <code>false</code> by <code>true</code>, i.e. replace the final 0 bit by 10.
|