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
Primitive(usize)The number associated with a primitive is used by the Language to identify the primitive.
Application(Box<Expression>, Box<Expression>)Abstraction(Box<Expression>)Index(usize)De Bruijn index referring to the nth-nearest abstraction (0-indexed).
For example, the identify function is (λ $0) or Abstraction(Index(0)).
Invented(usize)The number associated with an invented expression is used by the Language to identify the invention.
Trait Implementations
impl Debug for Expression[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more
impl Clone for Expression[src]
fn clone(&self) -> Expression[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Hash for Expression[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for Expression[src]
fn eq(&self, __arg_0: &Expression) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Expression) -> bool[src]
This method tests for !=.