Perhaps this is not the right place to ask and presumably this question is too 'meta', but is there any reason the <*>
(and analogously <$>
) function is infix? To my understanding and my knowledge (thus far) of Haskell it does the same as fmap
.
So, why is fmap
not infix but its Applicative and Functor variant are?
I think it's mostly motivated by this idiom:
f <$> x <*> y <*> z
Spelled with prefix functions it's a lot less pretty, and you need to know how many applications there are just to start typing:
ap (ap (fmap f x) y) z
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With