Add flipped fmap

Bas van Dijk v.dijk.bas at gmail.com
Thu Apr 8 17:29:54 EDT 2010


On Thu, Apr 8, 2010 at 11:21 PM, wren ng thornton
<wren at community.haskell.org> wrote:
> There is good motivation for having both of (>>=) and (=<<):
> * the (=<<) variant provides an applicative style by giving a name for
> Kleisli application.
> * and the (>>=) variant provides an imperative style for those who like that
> sort of thing.

Applying the same reasoning to <$> and <$$>:

* <$> serves to support the applicative style by giving a name for
functorial application. (as you mentioned)
* <$$> provides an imperative style for those who like that sort of
thing. As in:

do m1
   m2
   m3 <$$> bigPieceOfCodeThat
             whenUsingFlipFmap
               willVisuallyBreak
                  theImperativeNature
                    ofADoExpression


More information about the Libraries mailing list