git.iko.soy/rowtype-yoga/purescript-native
on cd4c708 help sign in
23 lines 387 B history raw
1module Main where
3import Prelude
4import Control.Monad.Eff.Console (log)
6test = \x -> case x of
7 { str = "Foo", bool = true } -> true
8 { str = "Bar", bool = b } -> b
9 _ -> false
11f = \o -> case o of
12 { foo = "Foo" } -> o.bar
13 _ -> 0
15h = \o -> case o of
16 a@[_,_,_] -> a
17 _ -> []
19isDesc :: Array Number -> Boolean
20isDesc [x, y] | x > y = true
21isDesc _ = false
23main = log "Done"