How does "true" evaluate in the lazy lambda calculus?

52 Views Asked by At

In the lambda calculus, "true" is defined as a function that takes two arguments but returns the first one:

true = \x.\y.x

What happens if you evaluate this lazily after giving it only one argument?

(\x.\y.x a)

In either the lazy or eager case it should give

\y.a

yet this is a function that doesn't even care about it's argument y. So if we're lazy, does it actually resolve to just a, without even providing the argument y? Or does it still have to wait for the argument, only it doesn't bother evaluating the argument if it happens to be an expression rather than a simple value?

0

There are 0 best solutions below