Started adding cases to the grammar.

This commit is contained in:
Samuel Hammersberg 2023-02-17 15:25:06 +01:00
parent d345ccb33b
commit 7cedc2e28c
2 changed files with 28 additions and 19 deletions

View file

@ -4,17 +4,17 @@
--main : Int;
--main = tripplemagic ((\x:Int. x+x+3) ((\x:Int. x) 2)) 5 3
apply : (Int -> Int) -> Int -> Int;
apply f x = f x;
main : Int;
main = (\x : Int . x + 5) 5
--apply : (Int -> Int -> Int) -> Int -> Int;
--apply f x y = f x y;
--krimp: Int -> Int -> Int;
--krimp x y = x + y;
--apply : (Int -> Int) -> Int -> Int;
--apply f x = f x;
--
--main : Int;
--main = apply (krimp) 2 3;--apply (\y: Int . (\x: Int . x + y + 2)) 5 2;
--main = (\x : Int . x + 5) 5
apply : (Int -> Int -> Int) -> Int -> Int -> Int;
apply f x y = f x y;
krimp: Int -> Int -> Int;
krimp x y = x + y;
main : Int;
main = apply (krimp) 2 3;--apply (\y: Int . (\x: Int . x + y + 2)) 5 2;