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]
impl Debug for Expressionfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Expression[src]
impl Clone for Expressionfn clone(&self) -> Expression[src]
fn clone(&self) -> ExpressionReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Hash for Expression[src]
impl Hash for Expressionfn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash<__H: Hasher>(&self, state: &mut __H)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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl PartialEq for Expression[src]
impl PartialEq for Expressionfn eq(&self, other: &Expression) -> bool[src]
fn eq(&self, other: &Expression) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Expression) -> bool[src]
fn ne(&self, other: &Expression) -> boolThis method tests for !=.
impl Eq for Expression[src]
impl Eq for ExpressionAuto Trait Implementations
impl Send for Expression
impl Send for Expressionimpl Sync for Expression
impl Sync for Expression