git.iko.soy/rowtype-yoga/purescript-native
on 24fdff2 help sign in
16 lines 348 B history raw
1module Main where
3import Prelude ()
5class Applicative f where
6 pure :: forall a. a -> f a
7 apply :: 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 apply (Just f) (Just a) = Just (f a)
14 apply _ _ = Nothing
16main = Control.Monad.Eff.Console.log "Done"