Skip to content

Deric-W/lambda_repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lambda_repl

Hatch project Tests codecov

The lambda_repl package contains a REPL for the lambda calculus.

To use it, execute lambda-repl or python3 -m lambda_repl and enter commands.

Requirements

Python >= 3.10 and the packages lambda_calculus and lark are required to use this package.

Installation

python3 -m pip install lambda-repl

Examples

python3 -m lambda_repl
Welcome to the the Lambda REPL, type 'help' for help
λ alias I = \x.x
λ alias K = λx.λy.x
λ import SUCC = lambda_calculus.terms.arithmetic.SUCCESSOR
λ aliases
I = (λx.x)
K = (λx.(λy.x))
SUCC = (λn.(λf.(λx.(f ((n f) x)))))
λ trace K a b
β ((λy.a) b)
β a
λ exit
Exiting REPL...