Reputation: 1
I'm new here and new to lambda calculus. My question is: In lambda calculus reduction (to normal form), is there a way to evaluate the expression (to make sure I did the reduction correctly).
for example (/ stands for lambda) (using beta method)
/x.y(/z.xz))(/y.zy)
=> /x.y(/z.xz))z
=> (/x.yx)z
=> yz
now how to make sure my reduction is right? is there a way i can evaluate the original one and compare it to the reduced one?
Upvotes: 0
Views: 431
Reputation: 632
What you did there already was the evaluation of that Lambda expression. If you mean let a computer evaluate it, a lambda function like this one
is written like this in Haskell:
(\a b => b a)
Python:
lambda a, b: b(a)
C#:
(a, b) => b(a)
Upvotes: 1