Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/414owen/lambda-repl

JS / jison port of my lambda-calculus reducer
https://github.com/414owen/lambda-repl

functional jison lambda lambda-calculus mathematics maths

Last synced: 16 days ago
JSON representation

JS / jison port of my lambda-calculus reducer

Awesome Lists containing this project

README

        

# Pure-Lambda-JS

**New and shiny** - check out the [live demo](https://lambda.how/).

This is a JavaScript port of my C lambda parser / reducer found [here](https://github.com/414owen/pure-lambda).

I use Jison as a parser generator, and [De Bruijn indices](https://en.wikipedia.org/wiki/De_Bruijn_index) to enable the step-by-step reduction logic.

This interpreter understands expressions that look like this:

```
ab
\a.a
(\a.a)b
(\ab.ba)\cc.c
(\a.a)(\b.b)(\c.cc)da
```

...and will reduce them, something like this:

```
> (\a.a)(\b.b)(\c.cc)da
(a->a)(b->b)(c->cc)da
(b->b)(c->cc)da
(c->cc)da
dda
```