git.iko.soy/rowtype-yoga/purescript-native
on db2dd21 help sign in
28 lines 517 B history raw
1module Main where
3 import Prelude
5 test = \x -> case x of
6 { str = "Foo", bool = true } -> true
7 { str = "Bar", bool = b } -> b
8 _ -> false
10 f = \o -> case o of
11 { foo = "Foo" } -> o.bar
12 _ -> 0
14 g = \o -> case o of
15 { arr = [x : xs], take = "car" } -> x
16 { arr = [_, x : xs], take = "cadr" } -> x
17 _ -> 0
20 h = \o -> case o of
21 a@[_,_,_] -> a
22 _ -> []
24 isDesc :: [Number] -> Boolean
25 isDesc [x, y] | x > y = true
26 isDesc _ = false
28 main = Debug.Trace.trace "Done"