Enum programinduction::lambda::Expression[][src]

pub enum Expression {
    Primitive(usize),
    Application(Box<Expression>, Box<Expression>),
    Abstraction(Box<Expression>),
    Index(usize),
    Invented(usize),
}

Expressions of lambda calculus, which only make sense with an accompanying Language.

Variants

The number associated with a primitive is used by the Language to identify the primitive.

De Bruijn index referring to the nth-nearest abstraction (0-indexed). For example, the identify function is (λ $0) or Abstraction(Index(0)).

The number associated with an invented expression is used by the Language to identify the invention.

Trait Implementations

impl Debug for Expression
[src]

Formats the value using the given formatter. Read more

impl Clone for Expression
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for Expression
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Expression
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Expression
[src]

Auto Trait Implementations

impl Send for Expression

impl Sync for Expression