git.iko.soy/rowtype-yoga/purescript-native
on 8a10621 help sign in
18 lines 358 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 """
11 function explode() {
12 throw new Error('Incorrect result');
13 }
14 """ :: forall eff a. Eff eff a
16main = case match2 [1, 2, 3, 4, 5, 6, 7, 8, 9] of
17 100 -> Debug.Trace.trace "Done"
18 _ -> explode