/ HackerRank Functional Challenges

HR F#: Lambda Calculus - Evaluating Expressions #4

This problem just checks how well you have got the idea of Church encoding while solving the previous problem.

Compute the value of λx.λy.x(xy).

Just by looking at the definition of the Church numerals it is easy to see that this function corresponds to number 2. And this is the right answer.

Alex Netkachov

Alex Netkachov

Alex likes functional programming, algorithms and code reviews. Apart from programming, his favourites are walking with his family in the parks and national trails and reading books.

Read More

Why not to stay updated if the subject is interesting? Join Telegram channel Alex@Net or follow alex_at_net on Twitter. Or just, use the comments form below.