[Haskell-cafe] The problem with Monads...

Rafael Gustavo da Cunha Pereira Pinto RafaelGCPP.Linux at gmail.com
Tue Jan 13 09:56:55 EST 2009


Last night I was thinking on what makes monads so hard to take, and came to
a conclusion: the lack of a guided tour on the implemented monads.

Let's take the Writer monad documentation: all it says is:

Inspired by the paper "Functional Programming with Overloading and
Higher-Order Polymorphism",
        Mark P Jones (http://web.cecs.pdx.edu/~mpj/pubs/springschool.html)
          Advanced School of Functional Programming, 1995.

SO WHAT?

The best approach is the Part II of the "All About Monads" tutorial. There
you have the almost ideal approach, except that the examples are just thrown
there, with no step-by-step explanation.

Of course one could copy, paste and run it, but this gives pretty much a "is
it right?'  feeling. Questions like "if a Reader is an application, why
don't use a regular function instead?" or "what bind means for a State
monad?".

I will try to work on a "Part II" extended version on my vacations... maybe
a WikiMonad... or MonadPedia... :-)

After all, it is my duty as a haskell noob to write another monad tutorial!
:D

Cheers!

-- 
Rafael Gustavo da Cunha Pereira Pinto
Electronic Engineer, MSc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090113/ea8edc07/attachment.htm


More information about the Haskell-Cafe mailing list