mirror of
https://github.com/lisk77/lambda.git
synced 2025-10-24 18:28:49 +00:00
chore: renamed the examples
This commit is contained in:
parent
9ff3943819
commit
199251ec6b
3 changed files with 0 additions and 0 deletions
13
examples/numbers
Normal file
13
examples/numbers
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
0 = \ f x . x;
|
||||
1 = \ f x . f x;
|
||||
2 = \ f x . f ( f x );
|
||||
|
||||
isZero = \ n . n (\ x . false) true;
|
||||
succ = \ n f x . f ( n f x );
|
||||
pred = \ n f x . n (\ g h . h ( g f )) (\u . x) (\u . u);
|
||||
add = \ m n . n succ m;
|
||||
sub = \ m n . n pred m;
|
||||
mul = \ m n f . m ( n f );
|
||||
exp = \ b n . n b;
|
||||
|
||||
main = add 2 1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue