git.iko.soy/rowtype-yoga/purescript-native
on caa01ae help sign in
23 lines 397 B history raw
1test = \x -> case x of
2 { str = "Foo", bool = true } -> true
3 { str = "Bar", bool = b } -> b
4 _ -> false
6f = \o -> case o of
7 { foo = "Foo" } -> o.bar
8 _ -> 0
10g = \o -> case o of
11 { arr = [x : xs], take = "car" } -> x
12 { arr = [_, x : xs], take = "cadr" } -> x
13 _ -> 0
16h = \o -> case o of
17 a@[_,_,_] -> a
18 _ -> []
20isDesc = \o -> case o of
21 [x, y] | x > y -> true
22 _ -> false