PatrikValkovic/lambda-cli

Program that parse lambda calculus and performs reductions

★ 0Forks 0PythonGitHub ↗Compare

README

Lambda CLI

This example is application, that can evaluate lambda expressions. For more about lambda calculus, see wikipedia. The application output each reduction step by step.

Usage

You need some library installed before running the example. Type the following command to install them.

pip install -r requirements.txt

You can then run the application by executing run.py script.

python ./run.py

It will show you command line, where you type your lambda expressions to evaluate.

Example

For example take this lambda expression.

((lambda var y. ((lambda z. ((lambda f. (z f)) z)) var)) 3 7)

The program will output following lines.

((lambda var y. ((lambda z. ((lambda f. (z f)) z)) var)) 3 7)
((lambda y. ((lambda z. ((lambda f. (z f)) z)) 3)) 7)
((lambda z. ((lambda f. (z f)) z)) 3)
((lambda f. (3 f)) 3)
(3 3)

Author: Patrik Valkovič

Licence: GPLv3

Contributors

PatrikValkovic

Issues