Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 544 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 544 Bytes

Untyped Lambda Calculus

Repl

To open the repl, run the command:

$ stack run

Example of using the repl

Creating a representation for the booleans values

Untyped> let true := λa. λb. a
Untyped> let false := λa. λb. b

Let's make a conditional structure: if <expr> then <expr> else <expr>

Untyped> let ifThenElse := λp. λa. λb. p a b

Executing the code if true then zero else one

Untyped> let zero := λs. λz. z
Untyped> let one := λs. λz. s z
Untyped> ifThenElse true zero one