W

Function W 

Source
pub fn W() -> Term
Expand description

W - the duplicating combinator.

W ≡ λxy.x y y ≡ λ λ 2 1 1

§Example

use lambda_calculus::combinators::W;
use lambda_calculus::*;

assert_eq!(
    beta(app!(W(), Var(1), Var(2)), NOR, 0),
    app!(Var(1), Var(2), Var(2))
);