Why is the <*> function of infix in Haskell?

Perhaps this is the wrong place to ask, and probably this question is too meta, but is there any reason that the function <*> (and similarly <$> ) is infix? To my understanding and my knowledge (so far) of Haskell, it does the same thing as fmap .

So why is fmap not an infix, but its variant is Applicative and Functor?

+6
source share
1 answer

I think this is mainly due to this idiom:

 f <$> x <*> y <*> z 

Using prefix functions is much less attractive, and you need to know how many applications there are just to start typing:

 ap (ap (fmap fx) y) z 
+13
source

All Articles