Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeta611/lamb
🐑f.(🐑x.f(x x))(🐑x.f(x x))
https://github.com/zeta611/lamb
lambda-calculus nom-parser rust
Last synced: about 1 month ago
JSON representation
🐑f.(🐑x.f(x x))(🐑x.f(x x))
- Host: GitHub
- URL: https://github.com/zeta611/lamb
- Owner: Zeta611
- Created: 2023-05-15T13:29:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-01T07:44:33.000Z (7 months ago)
- Last Synced: 2024-06-01T08:54:13.698Z (7 months ago)
- Topics: lambda-calculus, nom-parser, rust
- Language: Rust
- Homepage:
- Size: 16.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🐑
## Example
```rust
let e = parse("((\\x.x) (\\y.y)) z");
println!("e = {:?}", e);
println!("FV(e) = {:?}", free_var(&e));
println!("closed(e) = {:?}", closed(&e));
println!("eval(e) = {:?}", beta_red(&e, 0));
``````
e = App(App(Lamb("x", Var("x")), Lamb("y", Var("y"))), Var("z"))
FV(e) = {"z"}
closed(e) = false
eval(e) = (Var("z"), 0)
```