git.iko.soy/rowtype-yoga/purescript-native
on e82e607 help sign in
16 lines 336 B history raw
1module Main where
3import Prelude ()
5class Applicative f where
6 pure :: forall a. a -> f a
7 (<*>) :: forall a b. f (a -> b) -> f a -> f b
9data Maybe a = Nothing | Just a
11instance applicativeMaybe :: Applicative Maybe where
12 pure = Just
13 (<*>) (Just f) (Just a) = Just (f a)
14 (<*>) _ _ = Nothing
16main = Debug.Trace.trace "Done"