Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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))

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)
```