The Lumber Room

"Consign them to dust and damp by way of preserving them"

Understanding monads

leave a comment »

“Sigfpe” (Dan Piponi) has written some helpful posts on his blog. Together with other stuff, I understand it… somewhat. Or maybe I understand it perfectly, I don’t know.

Although they are in descending order of “simpleness”, this is the order in which I saw them:
First, read the definition of monads from here (only), and stop. It probably won’t make sense.

This excellent post:
You Could Have Invented Monads! (And Maybe You Already Have.)
explains monads with enough examples — they are a kind of “lift”. The definition makes sense now.

That, and Philip Wadler’s original paper should suffice.

There are too many monad tutorials, and quoting from Tell us why your language sucks:

So, things I hate about Haskell:

Let’s start with the obvious. Monad tutorials. No, not monads. Specifically the tutorials. They’re endless, overblown and dear god are they tedious. Further, I’ve never seen any convincing evidence that they actually help. Read the class definition, write some code, get over the scary name.

Finally, whether you’re trying to teach someone monads or anything else, you must read Brent Yorgey’s Abstraction, intuition, and the “monad tutorial fallacy”:

But now Joe goes and writes a monad tutorial called “Monads are Burritos,” under the well-intentioned but mistaken assumption that if other people read his magical insight, learning about monads will be a snap for them. “Monads are easy,” Joe writes. “Think of them as burritos.” […] Of course, exactly the opposite is true, and all Joe has done is make it harder for people to learn about monads…


[Random interesting stuff:
This post looks at them as “expressions” v/s “commands”:
The IO Monad for People who Simply Don’t Care

There’s also some interesting stuff in the first half of this post.]

Written by S

Fri, 2008-01-04 at 20:40:27

Posted in Uncategorized

Tagged with , ,

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.