@@ -4,7 +4,7 @@ import Prelude
44
55test1 arr = arr !! 0 + arr !! 1 + 1
66
7−test2 = \arr -> case arr of
7+test2 = \arr -> case arr of
88 [x, y] -> x + y
99 [x] -> x
1010 [] -> 0
@@ -16,12 +16,19 @@ test3 = \tree sum -> case tree of
1616 One n -> n
1717 Some (n1 : n2 : rest) -> test3 n1 sum * 10 + test3 n2 sum * 5 + sum rest
1818
19−test4 = \arr -> case arr of
19+test4 = \arr -> case arr of
2020 [] -> 0
2121 [_] -> 0
2222 x : y : xs -> x * y + test4 xs
23−
23+
2424module Main where
2525
26−main = Trace.trace "Done"
26+import Arrays
27+import Prelude
2728
29+main = do
30+ let x = [3,2,1]
31+ let y = sort x
32+ if x == [3,2,1]
33+ then Trace.trace "Done"
34+ else Errors.throwError "Not done"