/ 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 and algorithms. Apart from programming, his favourites are walking with his family in the parks and national trails and reading about universe and history.

Read More