Function lambda_calculus::data::result::ok
source · pub fn ok() -> Term
Expand description
Applied to an argument it consumes it and produces a lambda-encoded Result::Ok
that contains
it.
OK ≡ λxab.a x ≡ λ λ λ 2 3
Example
use lambda_calculus::data::result::ok;
use lambda_calculus::*;
let ok_one: Result<usize, usize> = Ok(1);
assert_eq!(beta(app(ok(), 1.into_church()), NOR, 0), ok_one.into_church());