3 ms·
Syntax where symbols are used in leiu of words. For example, I have no clue what >>= and <$> mean from a glance. I have to look it up to get Monad and Functor
by shakna 10y ago
Syntax where symbols are used in leiu of words.
For example, I have no clue what >>= and <$> mean from a glance.
I have to look it up to get Monad and Functor. Why not use the word?
- moomin 10y agoWell, because it's pretty obvious after you've spent a week with Haskell. With that said, one thing the Haskell creators seem to regret is not requiring every operator to also have a name. (In the case of <$> it does: fmap)
- runeks 10y agoAs far as I can see, if you already know what fmap does and what infix notation is, you'll know what <$> is after looking it up just once. And if you know what a monad is, you'll also know what >>= does. And if you know neither of these things, then I'm fairly sure writing `fmap` and `bind` wouldn't help much anyway.