@@ -9,7 +9,15 @@ infixl 2 <$>
10class Functor f => Applicative (f : Type -> Type) where
10class Functor f => Applicative (f : Type -> Type) where
11 pure : a -> f a
11 pure : a -> f a
12− (<$>) : f (a -> b) -> f a -> f b
12+ (<$>) : f (a -> b) -> f a -> f b
15+(<$) : Applicative f => f a -> f b -> f a
16+a <$ b = fmap const a <$> b
19+($>) : Applicative f => f a -> f b -> f b
20+a $> b = fmap (const id) a <$> b
14class Applicative f => Alternative (f : Type -> Type) where
22class Applicative f => Alternative (f : Type -> Type) where
15 empty : f a
23 empty : f a