Skip to main content

Module term

Module term 

Source
Expand description

Re-exports§

pub use self::Notation::*;
pub use self::Term::*;

Structs§

Context
A context holding a list of names for classic notation printing.

Enums§

Notation
The notation used for parsing and displaying purposes.
Term
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.
TermError
An error that can be returned when an inapplicable function is applied to a Term.

Constants§

LAMBDA
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"].
UD
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.

Functions§

abs
Wraps a Term in an Abstraction. Consumes its argument.
app
Produces an Application of two given Terms without any reduction, consuming them in the process.