[Haskell-beginners] WWAAA... I hate monads

Daniel Carrera daniel.carrera at theingots.org
Wed Apr 22 06:21:14 EDT 2009


I hate monads.

I love 90% of Haskell. The functional stuff is beautiful, easy to 
understand, crystal clear, elegant, etc. But I'm having a mighty hard 
time getting my head around monads. Consider the following explanation 
of a monad:

"A monad is represented as a type constructor (call it m), a function 
that builds values of that type (a -> m a), and a function that combines 
values of that type with computations that produce values of that type 
to produce a new computation for values of that type".

1) I know what a type is, but not a "type constructor". I don't normally 
think of an Int or even a complex type as being "constructed" except in 
the sense of OOP which I know is not what the author means.

2) Just *read* the paragraph... "a type constructor, a function that 
builds value of that type, and a function that combines values of that 
type with computations that produce values of that type to produce a 
computation of values of that type"   Ugh....


Can anyone recommend a simple and clear explanation of monads? You can 
assume that I know basic math and basic Haskell syntax. So, for example, 
"a -> b" is much more clear than "a function that takes input of one 
type and has an output of a different type".

Any help would be appreciated.

Daniel.


More information about the Beginners mailing list