The lambda_repl
package contains a REPL
for the lambda calculus.
To use it, execute lambda-repl
or python3 -m lambda_repl
and enter commands.
Python >= 3.10 and the packages lambda_calculus
and lark
are required to use this package.
python3 -m pip install lambda-repl
python3 -m lambda_repl
Welcome to the the Lambda REPL, type 'help' for help
λ alias I = \x.x
λ alias K = λx.λy.x
λ import SUCC = lambda_calculus.terms.arithmetic.SUCCESSOR
λ aliases
I = (λx.x)
K = (λx.(λy.x))
SUCC = (λn.(λf.(λx.(f ((n f) x)))))
λ trace K a b
β ((λy.a) b)
β a
λ exit
Exiting REPL...