16 Nov
2008
16 Nov
'08
7:53 a.m.
On Sun, Nov 16, 2008 at 12:59:09AM +0200, Ariel J. Birnbaum wrote:
When working with Applicative, I often find myself defining and using this operator:
(<%>) :: (Applicative f) => f (a -> b) -> a -> f b f <%> x = f <*> pure x
and always keep wondering whether it is already known by another name.
f <%> x = fmap ($ x) f will be more efficient in many cases. As for the name, <$$> would be analogous with the existing <**>.