Proposal: add $> to Data.Functor
Stijn van Drongelen
rhymoid at gmail.com
Sun Dec 8 17:22:32 UTC 2013
> Data.Functor has <$> and <$, but not $>, which should be a flipped version
> of <$, analogous to <*>, <*, and *> in Control.Applicative.
Whoa there, it's not at all analogous. Your wording is almost suggesting
that <* is a flipped *>, but beyond that, they are uncomparable to begin
with.
Applicative functors:
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
(<*) :: Applicative f => f a -> f b -> f a
(*>) :: Applicative f => f a -> f b -> f b
Removing the `f` in the first position, you'd get an honest analogue for
any functor:
(<$>) :: Functor f => (a -> b) -> f a -> f b
(<$) :: Functor f => a -> f b -> f a
($>) :: Functor f => a -> f b -> f b
Here, I don't see how ($>) could be anything else than `const id`.
Or am I missing something here?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131208/dae65da0/attachment.html>
More information about the Libraries
mailing list