(no title)
smichel17 | 4 years ago
a <$> b
instead of (1 char longer) fmap a b
or (3 chars longer) a `fmap` b
I understand fmap, but <$> tripped me up for an embarrassingly long time when trying to read Haskell code. In any other language, I'd do a web search for the function I didn't understand, to learn more about it, but that doesn't work here because most search engines don't handle symbols well. You have to know to use Hoogle. But someone who's trying to teach themselves Haskell isn't just going to know that. Learning Haskell doesn't have to be harder than learning another language, but it does require inordinately more hand-holding.I'm sure I'm not the only one. This is something I would call an "inessential weirdness"[0] of Haskell. There is a whole host of others— <>, $, and >>= are some from the Prelude alone; it becomes especially tricky when people don't use explicit or qualified imports.
[0]: A term I learned from this excellent talk, https://harihareswara.net/texts/inessential-weirdnesses-in-f... which you can watch at https://media.libreplanet.org/u/libreplanet/m/inessential-we...
tome|4 years ago
https://www.google.com/search?hl=en&q=%3C%24%3E
https://stackoverflow.com/questions/37286376/what-does-mean-...