Nannygoat Hill

Monads

March 18, 2009 · Leave a Comment

Haskell – the programming language I’m teaching myself in odd moments – has monads. Monads are difficult to explain, so Google gives an entertainingly bizarre list of things that “monads are like”:

burritos
roach motels
nuclear waste containers
closure operators
space suits
assembly lines
lawnmowers
raiiiiiyayn, on your wedding day
ordinary monoids
objects
analogies
building a car out of bicycles instead of walking
souls
the Hotel California
recipes
playing at someone else’s house

Several of these are facetious references to the monad explanation problem itself, one is actually a reference to Liebnizian monads that got left in the list by mistake, and one is just something I threw in to be silly.

If you want my opinion, and I haven’t got deep enough into it to be much more than snide about it, which is why this post is here rather than on my programming blog, I think monads are like general algebras, or models of computational forms. And they are also a way of representing a temporal sequence as a chain of functional compositions, which is how the eternal static Spinozan plenitude of a Haskell program can actually get its hands dirty and do something useful.

Whether this is right, and how it all really works is something I don’t expect to understand until I write one of my own.

Categories: computers · mathematics · philosophy · words

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment