I'm learning lambda calculus. I came across this lambda expression:
lambda f s e . e f s
When I pass arguments 1 and 2 to the expression, it should return 1 2 but I cannot figure out how is that possible. The way I tried to expand this:
(lambda f s e . e f s) 1 2 -> beta reduction (lambda s e . e 1 s) 2 -> beta reduction (lambda e . e 1 2). I don't know what to do next.
When I passed this expression to some online lambda calculus tool, it said that f and s are unbound and it returns 1 2.
Can someone explain and show how the result is obtained here and what am I doing wrong? How is that possible that f and s are unbound? These variables are before the dot so I thought they're bound, or aren't they? Thanks for any help.
(lambda f s e. e f s) 1 2is evaluated as1 2$\endgroup$