Skip to content
JS / jison port of my lambda-calculus reducer
JavaScript Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.browserslistrc
.eslintrc.json
.gitignore
.npmignore
README.md
package.json
rollup.config.js

README.md

Pure-Lambda-JS

New and shiny - check out the live demo.

This is a JavaScript port of my C lambda parser / reducer found here.

I use Jison as a parser generator, and De Bruijn indices 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
You can’t perform that action at this time.