git.iko.soy/rowtype-yoga/purescript-native
on 171cc01 help sign in
15 lines 354 B history raw
1module Main where
3import Prelude
4import Partial.Unsafe (unsafePartial)
5import Test.Assert (assert')
6import Control.Monad.Eff (Eff)
8snd :: forall a. Partial => Array a -> a
9snd = \[_, y] -> y
11main :: Eff _ _
12main = do
13 let ts = unsafePartial (snd [1.0, 2.0])
14 assert' "Incorrect result from 'snd'." (ts == 2.0)
15 Control.Monad.Eff.Console.log "Done"