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