lmbd 0.1.4

A macro that computes everything at compile time.Based on lambda calculus.
Documentation
lambda!(t = {x}x y);

lambda!(f = {y}x y);

lambda!(and = {x,(y,t,f),f } t f x y , t ,f );

lambda!(or = {x,t,(y,t,f)} t f x y , t ,f );

lambda!(not = {x,f,t}t f x , t, f);

lambda!(if_else = {a,x,y}a x y );

lambda!(xor = {if_else ,x ,(not,y),y} if_else not x y, if_else, not);



#[cfg(test)]
mod tests {
    use crate::*;
    #[test]
    fn it_works() {
        assert_eq!(lambda!(to_bool,  t ) ,true);
        assert_eq!(lambda!(to_bool,  f ) ,false);
        assert_eq!(lambda!(to_bool , and , t ,f ),false);
        assert_eq!(lambda!(to_bool , or , t ,f ),true);
        assert_eq!(lambda!(to_bool , xor , t, t),false);
        assert_eq!(lambda!(to_bool , xor , f, t),true);
    }
}