mirror of
https://github.com/lisk77/lambda.git
synced 2025-10-24 18:28:49 +00:00
feat: initial commit
This commit is contained in:
commit
0dd91da74f
17 changed files with 683 additions and 0 deletions
12
examples/pair.lambda
Normal file
12
examples/pair.lambda
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue