git.iko.soy/rowtype-yoga/purescript-native
on bcabaab help sign in
16 lines 353 B history raw
1module Main where
3import Control.Monad.Eff
5match2 :: [Number] -> Number
6match2 (x : y : xs) = x * y + match2 xs
7match2 _ = 0
9foreign import explode
10 "function explode() {\
11 \ throw new Error('Incorrect result');\
12 \}" :: forall eff a. Eff eff a
14main = case match2 [1, 2, 3, 4, 5, 6, 7, 8, 9] of
15 100 -> Debug.Trace.trace "Done"
16 _ -> explode