Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/414owen/lambda-repl
- Owner: 414owen
- Created: 2018-10-25T20:21:21.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-01T14:06:54.000Z (over 4 years ago)
- Last Synced: 2024-04-23T16:20:39.315Z (7 months ago)
- Topics: functional, jison, lambda, lambda-calculus, mathematics, maths
- Language: JavaScript
- Homepage: https://lambda.how/
- Size: 43.9 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```