git.iko.soy/rowtype-yoga/purescript-native
on 4e92b9b help sign in
18 lines 284 B history raw
1module Main where
3import Prelude
5snd = \[_, y] -> y
7foreign import error
8 """
9 function error(msg) {
10 throw msg;
11 }
12 """ :: forall a. String -> a
14main =
15 let ts = snd [1.0, 2.0] in
16 if ts == 2.0
17 then Debug.Trace.trace "Done"
18 else error "Incorrect result from 'snd'."