@@ -11,19 +11,23 @@ nil :: forall a. ArrayBox Z a
1111nil = ArrayBox []
1212
1313foreign import concat
14− "function concat(l1) {\
15− \ return function (l2) {\
16− \ return l1.concat(l2);\
17− \ };\
18− \}" :: forall a. [a] -> [a] -> [a]
14+ """
15+ function concat(l1) {
16+ return function(l2) {
17+ return l1.concat(l2);
18+ };
19+ }
20+ """ :: forall a. [a] -> [a] -> [a]
1921
2022cons' :: forall a n. a -> ArrayBox n a -> ArrayBox (S n) a
2123cons' x (ArrayBox xs) = ArrayBox $ concat [x] xs
2224
2325foreign import error
24− "function error(msg) {\
25− \ throw msg;\
26− \}" :: forall a. String -> a
26+ """
27+ function error(msg) {
28+ throw msg;
29+ }
30+ """ :: forall a. String -> a
2731
2832main = case cons' 1 $ cons' 2 $ cons' 3 nil of
2933 ArrayBox [1, 2, 3] -> Debug.Trace.trace "Done"