Skip to content
Lambda calculus expression simplifier repl
C Yacc Makefile Lex
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.gitconfig
.gitignore
README.md
ast.c
ast.h
eval.c
eval.h
lambda.l
lambda.y
main.c
makefile
stack.c
stack.h

README.md

Lambda REPL

A lambda expression parser and step-by-step evaluator.

Build dependencies: readline headers

To build:

$ make

To Run:

./lambda

Usage:

Enter lambda expressions in the following notation:

> a
a

> aa
aa

> ab
ab

> \a.a
a->a

> (\a.a)b
(a->a)b
b

> (\a.ab)c
(a->ab)c
cb

> (\a.a)(\b.b)
(a->a)(b->b)
b->b

> (\a.a)\a.a
(a->a)(a->a)
a->a

> (\a.aa)(\b.b)
(a->aa)(b->b)
(b->b)(b->b)
b->b

> (\a.aaaa)(\b.b)
(a->aaaa)(b->b)
(b->b)(b->b)(b->b)(b->b)
(b->b)(b->b)(b->b)
(b->b)(b->b)
b->b

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

> (\a.(\b.bb)a)a
(a->(b->bb)a)c
(b->bb)c
cc

> \abc.cba
a->b->c->cba

> (\ab.ba)\cc.c
(a->b->ba)(c->c->c)
b->b(c->c->c)
You can’t perform that action at this time.