Najran A
Najran A

Reputation: 1

lambda calculus evaluation

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

Answers (1)

Tau
Tau

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

formula

is written like this in Haskell:

(\a b => b a)

Python:

lambda a, b: b(a)

C#:

(a, b) => b(a)

Upvotes: 1

Related Questions