Skip to content

414owen/lambda-repl

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages