If you perform a single beta reduction on expression (λx.λy.x x y)(λz.z z), what do you get?

  1. λy.λz.z z (λz.z z) y
  2. (λx.λy.x x y) (λx.λy.x x y)
  3. λx.λy.(x x y) (x x y)
  4. λy.(λz.z z) (λz.z z) y

λy.(λz.z z) (λz.z z) y

(Note that answer (a) is wrong because standard precedence rules says that it is the same as λy.λz.(z z (λz.z z) y), which is not correct.)