min

Function min 

Source
pub fn min() -> Term
Expand description

Applied to two Church-encoded numbers it returns the smaller one.

MIN ≡ λaλb.(LEQ a b) a b ≡ λ λ (LEQ 2 1) 2 1

§Example

use lambda_calculus::data::num::church::min;
use lambda_calculus::*;

assert_eq!(beta(app!(min(), 4.into_church(), 3.into_church()), NOR, 0), 3.into_church());