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::beta_full;

assert_eq!(beta_full(c().app(0.into()).app(1.into()).app(2.into())),
           beta_full(Term::from(0).app(2.into()).app(1.into())));