λ-Calculus Online Playground
Try writing your lambda expression! We've defined some basic expressions for you:
Y = λf.(λx.f (x x)) λx.f (x x)
I = λz.z
T = λx.λy.x
F = λx.λy.y
O = λf.λx.x
S = λn.λf.λx.f (n f x)
P = λn.λf.λx.n (λg.λh.h (g f)) (λu.x) λu.u
One = λf.λx.f x
Two = λf.λx.f (f x)
Plus = λn.λm.λf.λx.n f (m f x)
Mul = λn.λm.λf.λx.n (m f) x
Exp = λn.λm.n (Mul m) One
IfThenElse = λe.λx.λy.e x y
IsZero = λn.n (λx.F) T
Fact = λf.λn.IsZero n One (Mul n (f (P n)))
You can click on underlined part to make beta reduction, or click on predefined named variables to expand them.