Functional Programming, Haskell, Computer Science, Lambda Calculus, Algorithms.
superior to “write a λ-term and hope it works”. Here is a working implementation. For fun, here is the full reduction of a recursive Scott-encoded 2*2, each section corresponding to a single step: b = λc.λd.(c λe.λf.(e λg.λh.h)) a = λi.((i λj.λk.λl.(k λm.λn.(m (a j)))) λo.λp.p) (a b)