git.iko.soy/rowtype-yoga/purescript-native
on 136cd21 help sign in
10 lines 244 B history raw
1data Maybe a = Nothing | Just a
3maybe :: forall a b. b -> (a -> b) -> Maybe a -> b
4maybe = \b -> \f -> \m -> case m of
5 Nothing -> b
6 Just a -> f a
8fmap = \m -> \f -> maybe Nothing (\a -> Just (f a)) m
10bind = \m -> \f -> maybe Nothing f m