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