Function lambda_calculus::pair::pair
[−]
[src]
pub fn pair() -> Term
Produces a Church-encoded pair; applying it to two other terms puts them inside it.
PAIR := λxyz.z x y = λ λ λ 1 3 2
Example
use lambda_calculus::pair::pair; use lambda_calculus::arithmetic::{zero, one}; let pair01 = pair().app(zero()).app(one()); assert_eq!(pair01.fst_ref(), Ok(&zero())); assert_eq!(pair01.snd_ref(), Ok(&one()));