Module lambda_calculus::term
source · Expand description
Re-exports
Enums
- The notation used for parsing and displaying purposes.
- A lambda term that is either a variable with a De Bruijn index, an abstraction over a term or an applicaction of one term to another.
- An error that can be returned when an inapplicable function is applied to a
Term
.
Constants
- The character used to display lambda abstractions. The default is the Greek letter ‘λ’, but it can also be set to a ’' (backslash) using
features = ["backslash_lambda"]
. - An undefined term that can be used as a value returned by invalid/inapplicable operations, e.g. obtaining an element of an empty list. Since this implementation uses De Bruijn indices greater than zero,
Var(0)
will not occur naturally. It is displayed asundefined
.
Functions
- Wraps a
Term
in anAbs
traction. Consumes its argument. - Produces an
App
lication of two givenTerm
s without any reduction, consuming them in the process.