Enum lambda_calculus::term::Notation
source · pub enum Notation {
Classic,
DeBruijn,
}
Expand description
The notation used for parsing and displaying purposes.
Examples
use lambda_calculus::combinators::S;
assert_eq!(&format!( "{}", S()), "λa.λb.λc.a c (b c)"); // Classic notation
assert_eq!(&format!("{:?}", S()), "λλλ31(21)"); // DeBruijn index notation
Variants§
Classic
classic lambda calculus notation; used by fmt::Display
DeBruijn
De Bruijn indices; used by fmt::Debug
Trait Implementations§
source§impl PartialEq<Notation> for Notation
impl PartialEq<Notation> for Notation
impl Copy for Notation
impl Eq for Notation
impl StructuralEq for Notation
impl StructuralPartialEq for Notation
Auto Trait Implementations§
impl RefUnwindSafe for Notation
impl Send for Notation
impl Sync for Notation
impl Unpin for Notation
impl UnwindSafe for Notation
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