Could you explain what should I do about
λx.λy.x
part? Thanks.
The parentheses are pretty bad, here is my guess on what the expression should be in order to evaluate to a number in the end:
$(\lambda x.\lambda y.(x + ( \lambda x.x+1) (x+y)))~( (\lambda z.(z-4))~5)~10$
Then you just have to reduce everything. Here is a step-by-step reduction:
$$\begin{array}{l} (\lambda x.\lambda y.(x + ( \lambda x.x+1) (x+y)))~( (\lambda z.(z-4))~5)~10\\ \to (\lambda x.\lambda y.(x + (x+y+1)))~(5-4)~10\\ \to (\lambda x.\lambda y.(2x+y+1))~1~10\\ \to (\lambda y.(2*1+y+1))~10\\ \to (2*1+10+1)\\ \to 13 \end{array}$$
Copyright © 2021 JogjaFile Inc.
The parentheses are pretty bad, here is my guess on what the expression should be in order to evaluate to a number in the end:
$(\lambda x.\lambda y.(x + ( \lambda x.x+1) (x+y)))~( (\lambda z.(z-4))~5)~10$
Then you just have to reduce everything. Here is a step-by-step reduction:
$$\begin{array}{l} (\lambda x.\lambda y.(x + ( \lambda x.x+1) (x+y)))~( (\lambda z.(z-4))~5)~10\\ \to (\lambda x.\lambda y.(x + (x+y+1)))~(5-4)~10\\ \to (\lambda x.\lambda y.(2x+y+1))~1~10\\ \to (\lambda y.(2*1+y+1))~10\\ \to (2*1+10+1)\\ \to 13 \end{array}$$