Add flipped fmap
wren ng thornton
wren at community.haskell.org
Thu Apr 8 17:36:39 EDT 2010
Felipe Lessa wrote:
> <$$> will be as concise and useful as <$>, maybe even more,
> because `flip fmap` isn't valid.
>
> 2) Simmetry, as the ticket says.
If we want to keep the analogies complete then we'll need to add
($$)=flip($) as well. As a prefix function it has a perspicuous type
(type raising (Smullyan's thrush), aka CPS translation) and I've used it
in a number of projects because of that.
All the same, I would not consider it worthwhile to add to any library
(excepting one which contains Data.Smullyan :) And it only opens the
way for defining (!$$), and then why not add (<!$$>), (<!**>),... Every
combinator has its place, but often that place is in a local module so
that users/maintainers can easily figure out what your line noise means.
--
Live well,
~wren
More information about the Libraries
mailing list