jxxcarlson/elm-lambda/1.0.0

Lambda.Expression

In this module we define the type Expr used to represent the lambda calculus. The main function is beta: Expr -> Expr which carries out beta reductions.

type Expr
= Var String
| Lambda String Expr
| Apply Expr Expr

beta reduce expression

Map variable names to "a", "b", ..., "z" to the extent possible

isNormal : Expr -> Bool

is the expression in normal form?

remove numeric subscripts in variable names to the extent possible

toString : Expr -> String

String representation of expression

For checking things: https://lambdacalc.io/