
Brent Yorgey
On Fri, Jul 30, 2010 at 03:46:09AM -0700, Kevin Jardine wrote:
When I plunged into Haskell earlier this year, I had no problem with understanding static typing, higher level functions and even separating pure functions from IO functions.
The more I learn about monads, however, the less I understand them. I've seen plenty of comments suggesting that monads are easy to understand, but for me they are not.
Lies. [...]
Even worse, this misguided but common insistence that monads are easy to understand inevitably makes people feel stupid when they discover that they aren't.
Monads are hard to understand. But they are *worth understanding*.
I agree to some extent, but only to some. Mostly the problem of people is that they are trying to understand "monads" as opposed to specific instances. It's better to learn "the IO monad", "state monads", "the list monad", "the Maybe monad", "the Parser monad", etc. My experience is that the more specific examples you learn, the more you will see the common design pattern. Eventually it will make /click/ and out of a sudden the lights will turn on. So what's "monad"? It's nothing. Simple. Better ask: "What's the Maybe monad?". Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/