We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The way I think of church numerals is as follows.
0 is defined as just your input so x
1 is defined as applying a generic function once to your generic input so f(x)
2 is f(f(x))
and so on. In lambda calculus this 2 would be expressed as
λf.λx.f f x.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Lambda Calculus - Evaluating Expressions #4
You are viewing a single comment's thread. Return to all comments →
The way I think of church numerals is as follows. 0 is defined as just your input so x 1 is defined as applying a generic function once to your generic input so f(x) 2 is f(f(x)) and so on. In lambda calculus this 2 would be expressed as λf.λx.f f x.