Function lambda_calculus::combinators::c
[−]
[src]
pub fn c() -> Term
C - the swapping combinator.
C := λxyz.x z y = λ λ λ 3 1 2
Example
use lambda_calculus::term::Term; use lambda_calculus::combinators::c; use lambda_calculus::reduction::normalize; assert_eq!(normalize(c().app(0.into()).app(1.into()).app(2.into())), normalize(Term::from(0).app(2.into()).app(1.into())));