Skip to content

An extremely simple implementation of Lambda-Calculus Interpreter

Notifications You must be signed in to change notification settings

gb/lambda-calculus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lambda Calculus Build Status

An extremely simple implementation of Lambda-Calculus Interpreter.

Motivation

During my Compilers and Programming languages class (CS-421 @ UIUC), Lambda Calculus was one of the topics that really caught my eyes, for explain how function application works and what functions can do, and actually how functional languages are build around it.

This project is my attempt of implement a simple lambda calculus expression parser.

Requirements

Setup

git clone [email protected]:gb/lambda-calculus.git
cd lambda-calculus
make run

Example

Please type a lambda expression:
λ> (\x.x) a
((λx.x) a)
a
λ> (\x.x x) a
((λx.(x x)) a)
(a a)
λ> (\x.y x) a
((λx.(y x)) a)
(y a)
λ> (\x.\a.x) a
((λx.(λa.x)) a)
(λb.a)
λ> (\x.\x.x) a
((λx.(λx.x)) a)
(λx.x)
λ> (\x.(\y.y) x) a
((λx.((λy.y) x)) a)
((λy.y) a)
a
λ> (\x.\a.x) a
((λx.(λa.x)) a)
(λb.a)

Tests

A good way to understand the code intention is checking the test suite. To execute the tests:

make test

About

An extremely simple implementation of Lambda-Calculus Interpreter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published