lambda/examples/pair.lambda
2025-06-30 19:43:09 +02:00

12 lines
223 B
Text

pair = \ x y z . z x y;
first = \ p . p (\ x y . x);
second = \ p . p (\ x y . y);
cons = pair;
head = first;
tail = second;
nil = \ x y . y;
isNil = \ l . l (\ h t d . (\ x y . y)) (\ x y . x);
main = first (pair a b);