Proposal: Data.Functor.<.> for `fmap f2 . f1`
Edward Kmett
ekmett at gmail.com
Sun Sep 20 20:08:17 UTC 2015
This operator is usually named .: or the like. It is a weaker form of
fmap.fmap.
I'm pretty strongly -1 on including it in base under the <.> name.
I'm less strongly -1 on some .: variant.
-Edward
On Sat, Sep 19, 2015 at 9:30 PM, Ömer Sinan Ağacan <omeragacan at gmail.com>
wrote:
> I don't know if "I find this very useful" is enough for adding a function
> to
> base, but here it goes:
>
> infixl 4 <.>
> (<.>) :: Functor f => (b -> c) -> (a -> f b) -> (a -> f c)
> f1 <.> f2 = fmap f1 . f2
> {-# INLINE (<.>) #-}
>
> I first defined this couple of months ago and I find myself looking for
> this
> function all the time now.
>
> One problem with this is that the name is used by widely used `filepath`
> library.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150920/be827950/attachment.html>
More information about the Libraries
mailing list