https://github.com/bsamseth/lambda
Rust implementation of Lambda Calculus
https://github.com/bsamseth/lambda
Last synced: 3 months ago
JSON representation
Rust implementation of Lambda Calculus
- Host: GitHub
- URL: https://github.com/bsamseth/lambda
- Owner: bsamseth
- Created: 2022-06-13T22:19:54.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-04T18:20:19.000Z (almost 3 years ago)
- Last Synced: 2025-02-06T12:15:46.694Z (5 months ago)
- Language: Rust
- Homepage: https://bsamseth.github.io/lambda/
- Size: 1.11 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lambda Calculus Interpreter
A(nother) Lambda calculus interpreter, implemented in Rust. Because what better way is
there to learn a programming language, than to implement the best language there is in it.Eventually I want to add a compiler, so that you can run highly optimized Lambda
calculus programs. That's for a future improvement though.## Run
Pass the expression to evaluate to `evaluate` and watch as it transforms into its
smallest form. Variables are normalized and uses the numbers `1`, `2`, etc.You can use a backslash (`\`) to represent λ if you don't have a λ handy. Or use a λ if
you do. It handles either.```
$ cargo build --release
$ ./target/release/evaluate '(\x.λy. x y) (λx.x)'
'(\x.λy. x y) (λx.x)' -> λ1.1
```