[Haskell-beginners] Re: WWAAA... I hate monads
byorgey at seas.upenn.edu
Fri Apr 24 11:11:44 EDT 2009
On Fri, Apr 24, 2009 at 05:53:22PM +0300, Michael Snoyman wrote:
> On Fri, Apr 24, 2009 at 5:37 PM, Federico Brubacher <fbrubacher at gmail.com>wrote:
> > While i agree to some extent that analogies are bad in some sense , i found
> > this one really insightful when i was trying to put my head around monads :
> > http://www.haroldtherebel.com/2007/12/02/monads-and-schroedingers-cat/
> > what do u guys think ?
> I could be wrong here, but isn't he really describing functors and not
Well, it isn't quite clear, because the explanation seems sort of confused.
The "monads are a box that you can keep stuff in but can't get stuff
out of" metaphor is not new (google "monad space suit") and in my
opinion is somewhat unhelpful, for several reasons:
(1) with many monads, you CAN "get stuff out of the box"; but how
you do so is specific to each monad.
(2) As pointed out by Michael, the explanation in the linked blog
post seems to conflate fmap and (>>=), or at least glosses over
the difference. But this is a very crucial difference that you
must understand to manipulate anything more concrete than
imaginary boxes containing cats.
More information about the Beginners