pub enum LambdaExpr<'a, T> {
Lambda(LambdaExprRef, LambdaType),
BoundVariable(usize, LambdaType),
FreeVariable(FreeVar<'a>, LambdaType),
Application {
subformula: LambdaExprRef,
argument: LambdaExprRef,
},
LanguageOfThoughtExpr(T),
}Expand description
The core expression type of a lambda term
Variants§
Lambda(LambdaExprRef, LambdaType)
A lambda of a given type.
BoundVariable(usize, LambdaType)
A variable bound by a lambda, labeled by its De Bruijn index.
FreeVariable(FreeVar<'a>, LambdaType)
A free variable (may be named or anonymous, see FreeVar).
Application
The application of an argument to a function
Fields
§
subformula: LambdaExprRefThe body of the function
§
argument: LambdaExprRefThe argument of the function
LanguageOfThoughtExpr(T)
Any expression which is not part of the lambda calculus directly (e.g. primitives). See
crate::Expr for an example.
Trait Implementations§
Source§impl<'a, T: Clone> Clone for LambdaExpr<'a, T>
impl<'a, T: Clone> Clone for LambdaExpr<'a, T>
Source§fn clone(&self) -> LambdaExpr<'a, T>
fn clone(&self) -> LambdaExpr<'a, T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a, T: Debug> Debug for LambdaExpr<'a, T>
impl<'a, T: Debug> Debug for LambdaExpr<'a, T>
Source§impl<'a, T: Hash> Hash for LambdaExpr<'a, T>
impl<'a, T: Hash> Hash for LambdaExpr<'a, T>
Source§impl<'a, T: PartialEq> PartialEq for LambdaExpr<'a, T>
impl<'a, T: PartialEq> PartialEq for LambdaExpr<'a, T>
impl<'a, T: Eq> Eq for LambdaExpr<'a, T>
impl<'a, T> StructuralPartialEq for LambdaExpr<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for LambdaExpr<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for LambdaExpr<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for LambdaExpr<'a, T>where
T: Send,
impl<'a, T> Sync for LambdaExpr<'a, T>where
T: Sync,
impl<'a, T> Unpin for LambdaExpr<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for LambdaExpr<'a, T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].