Do you multiply or add when simplifying λ-expressions?

32 Views Asked by At

The question is to simplify this λ-expression (λx. x) (λx. λy. y x) 8 (λx. x + 1)

My current thinking is as follows (λx. x) (λx. λy. y x) 8 (λx. x + 1) = (λx. λy. y x) 8 (λx. x + 1)

(λx. λy. y x) 8 (λx. x + 1) = (λy. y 8)(λx. x + 1)

(λy. y 8)(λx. x + 1) = (λx. x + 1)(8)

(λx. x + 1)(8) = 8+1 = 9

However, I am told the answer is 72. why would the 9 multiply the previous 8 after it's substituted in?

0

There are 0 best solutions below