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):$ $$(\lambda x. (\,(\lambda y.(* 2 y)\,) (+ x y)\,)\,)\,y $$
$(b):$ $$(\lambda x. \lambda y. (x y)\,) \,(λz. (z y)\,)\,$$
Here are the steps I took in my first attempt at $(a)$:
$$(\lambda x. (* 2 (+ x y)))y $$ $$(\lambda x. (* 2 (+ x z)))y \thinspace $$
(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!