[Haskell-cafe] Good name for this operator?
lrpalmer at gmail.com
Sat Nov 15 18:23:08 EST 2008
On Sat, Nov 15, 2008 at 3:59 PM, Ariel J. Birnbaum <valgarv at gmx.net> wrote:
> Hi all!
> 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
Yeah, me too.
The syntax chosen for applicative does not encode all the information
about the lifting of each side. For example, as far as I can tell,
<$> is appropriate for both this and for fmap. So I think <%> is a
fine name (I often use % as the application operator when I'm
encoding lambda calculus).
More information about the Haskell-Cafe