REPL for the lambda calculus
Project description
lambda_repl
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.
Requirements
Python >= 3.10 and the packages lambda_calculus
and lark
are required to use this package.
Installation
python3 -m pip install lambda-repl
Examples
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...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lambda_repl-1.2.0.tar.gz
(20.5 kB
view hashes)
Built Distribution
Close
Hashes for lambda_repl-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61b4e3265baecc2e3263f4eedeaeef124639a2a460e250cbebd38e702c36a549 |
|
MD5 | 3055b40015599e4ecdc7e71fd21f76e5 |
|
BLAKE2b-256 | c3df376cc70eab838e9c884a82c0c85a5eae43453c98aa5f36b0eaf0ebd47e46 |