I am a little confused to reduce these lambda calculus expressions. I am instructed to give applicative and normal order reductions for these expressions.
(a) (λx. ((λy.(* 2 y)) (+ x y)))y
(b) (λx. λy. (x y)) (λz. (z y))
Here are the steps I took in my first attempt at (a):
(λx. (* 2 (+ x y)))y
(λx. (* 2 (+ x z)))y (substituting y with z)
(* 2 (+ y z))
I'm unsure if I even reduced that correctly and how I would reduce in applicative order. Any help is appreciated, thanks!
The reduction you gave is right. However this is the applicative order.
Recall: