Skip to content

Comment on The Haskell Heapparent

Comments

Out of all the confusing and misleading monad tutorials out there, this one finally made it click for me: http://ertes.de/articles/monads.html. He doesn't use any off-the-wall analogy like spacesuits or ghosts inside of boxes. Instead, he just explains monads for what they essentially are: reified future computations. Once I saw monads for what they are, instead of all the things they are not (e.g. bananas), it all seemed so simple. The fundamental similarities between various monads such as IO and lists, which had previously eluded me, really came into focus.

I wish more tutorial writers would realize that just because someone is a novice doesn't mean a challenging concept must be candy coated or abstracted to the point of near-meaninglessness in order to be palatable. Quite the opposite, in many cases.

I found that what made them click was writing them by hand. Writing a few simple programs using the Maybe, Reader, State and List monads and then implementing them by yourself from first principles clearly demonstrated for me that there was nothing magic at all about how they worked :)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.