Function lambda_calculus::data::pair::fst

source ·
pub fn fst() -> Term
Expand description

Applied to a lambda-encoded pair (a, b) it yields a.

FST ≡ λp.p TRUE ≡ λ 1 TRUE

Example

use lambda_calculus::data::pair::fst;
use lambda_calculus::*;

assert_eq!(
    beta(app(fst(), (1, 2).into_church()), NOR, 0),
    1.into_church()
);