Skip to content

Commit 83c40e2

Browse files
committed
Add test for list reverse
1 parent aca3b7b commit 83c40e2

File tree

8 files changed

+539
-28
lines changed

8 files changed

+539
-28
lines changed
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
let |> = fun x -> fun f -> f x
2+
let reverse = fun l -> let rec helper = fun l -> fun acc ->
3+
match l as t#a with ([], [], acc)
4+
| ( ::
5+
, [hd, tl]
6+
, (helper tl) (:: ((hd), (acc))) )
7+
in (helper l) []
8+
let head = fun l -> match l as t#b with (::, [hd, tl], hd)
9+
let l1 = :: ((1), (:: ((2), (:: ((3), ([]))))))
10+
let t1 = print_int (head (reverse l1))
11+
let t2 = (|> ((|> (reverse l1)) head)) print_int

Diff for: lamagraph-compiler/test/golden/core/core/T.lml.core

-14
This file was deleted.

Diff for: lamagraph-compiler/test/golden/core/source/List.lml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../typechecker/source/List.lml

Diff for: lamagraph-compiler/test/golden/core/source/T.lml

-14
This file was deleted.
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
33

Diff for: lamagraph-compiler/test/golden/eval/source/List.lml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../typechecker/source/List.lml

0 commit comments

Comments
 (0)