Fix first unnecessary supercombinator
This commit is contained in:
parent
69254f8032
commit
08917be1c6
10 changed files with 66 additions and 51 deletions
2
sample-programs/basic-1
Normal file
2
sample-programs/basic-1
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
f = \x. x+1;
|
||||
4
sample-programs/basic-2
Normal file
4
sample-programs/basic-2
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
add x = \y. x+y;
|
||||
|
||||
main = (\z. z+z) ((add 4) 6);
|
||||
|
||||
2
sample-programs/basic-3
Normal file
2
sample-programs/basic-3
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
main = (\x. x+x+3) ((\x. x) 2)
|
||||
2
sample-programs/basic-4
Normal file
2
sample-programs/basic-4
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
|
||||
f x = let g = (\y. y+1) in g (g x)
|
||||
9
sample-programs/basic-5
Normal file
9
sample-programs/basic-5
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
id x = x;
|
||||
|
||||
add x y = x + y;
|
||||
|
||||
double n = n + n;
|
||||
|
||||
apply f x = \y -> f x y;
|
||||
|
||||
main = apply (id add) ((\x. x + 1) 1) (double 3);
|
||||
Loading…
Add table
Add a link
Reference in a new issue