https://github.com/deric-w/lambda_repl
REPL for the lambda calculus
https://github.com/deric-w/lambda_repl
education lambda-calculus lambda-calculus-interpreter python3 read-eval-print-loop repl
Last synced: about 1 month ago
JSON representation
REPL for the lambda calculus
- Host: GitHub
- URL: https://github.com/deric-w/lambda_repl
- Owner: Deric-W
- License: gpl-3.0
- Created: 2022-08-24T18:29:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-11-25T10:51:15.000Z (4 months ago)
- Last Synced: 2025-11-28T01:55:08.645Z (3 months ago)
- Topics: education, lambda-calculus, lambda-calculus-interpreter, python3, read-eval-print-loop, repl
- Language: Python
- Homepage:
- Size: 72.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lambda_repl
[](https://github.com/pypa/hatch)

[](https://codecov.io/gh/Deric-W/lambda_repl)
The `lambda_repl` package contains a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop)
for the [lambda calculus](https://en.wikipedia.org/wiki/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`](https://github.com/Deric-W/lambda_calculus)
and [`lark`](https://github.com/lark-parser/lark) are required to use this package.
## Installation
```sh
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...
```