I think half of people failing to understand monads are people failing to understand typeclasses or HKT while trying to learn about monads. Once you get those, all you need is the Monad typeclass definition and a huge pile of motivating examples.
I think half of people failing to understand monads are people failing to understand typeclasses or HKT while trying to learn about monads. Once you get those, all you need is the Monad typeclass definition and a huge pile of motivating examples.
The Z is Y. The Y is an X that does W. ...omitted... Here's C, B and A. Now you understand!
First comment in this thread is exactly like that. Definitions, not explanations.
And then after telling you how monads are different than map for things that are _not_ lists, a bunch of follow up comments talk about... Lists.
Pedagogy does not work like that. What is it about haskell that ruins people's ability to explain things?
I'm not saying you shouldn't use examples to learn, I'm saying you should probably learn X and Y (type classes and HKT) before you try to learn Z (monads). Use as many examples as you like to learn them, but if you don't understand type classes and HKT, you will probably struggle to understand monads.
Haskell is the most maddening language to learn purely because of the community around it.