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