@@ -7,7 +7,7 @@ module Prelude
8 , (:), cons
8 , (:), cons
9 , Show, show
9 , Show, show
10− , Functor, (<$>), void
10+ , Functor, (<$>), (<$), ($>), (<#>), void
11 , Apply, (<*>)
11 , Apply, (<*>)
12 , Applicative, pure, liftA1
12 , Applicative, pure, liftA1
13 , Bind, (>>=)
13 , Bind, (>>=)
@@ -111,10 +111,22 @@ module Prelude
111 show = showArrayImpl show
111 show = showArrayImpl show
113 infixl 4 <$>
113 infixl 4 <$>
115 class Functor f where
118 class Functor f where
116 (<$>) :: forall a b. (a -> b) -> f a -> f b
119 (<$>) :: forall a b. (a -> b) -> f a -> f b
121+ (<#>) :: forall f a b. (Functor f) => f a -> (a -> b) -> f b
122+ (<#>) fa f = f <$> fa
124+ (<$) :: forall f a b. (Functor f) => b -> f a -> f b
125+ (<$) b fa = const b <$> fa
127+ ($>) :: forall f a b. (Functor f) => f a -> b -> f b
128+ ($>) fa b = const b <$> fa
118 void :: forall f a. (Functor f) => f a -> f Unit
130 void :: forall f a. (Functor f) => f a -> f Unit
119 void fa = const unit <$> fa
131 void fa = const unit <$> fa