I'm also a Haskell no-so-new-anymore-bie, and for me, understanding monads was a question of first reading the available docs, especially

http://sigfpe.blogspot.com/2006/08/you-could-have-invented-monads-and.html

and http://haskell.org/haskellwiki/IO_inside,

plus reading the Haskell School of Expression <http://haskell.org/soe/> book,

but mainly, creating some of the monad instances myself, step by step (I started with a random number generator, and ended with the list monad). I found this very useful, and I actually had to look many times to the existing solution to get it right. It made me appreciate the genius minds behind this. After a bit of practice, I can now use monads almost as easy as I can write imperative C/C++/C# code, although I find this is also the dangerous part of the do notation: you tend to forget the beautiful pure functional implementation that is behind the scenes, and start to think imperatively (again)...

If you want I can dig up my old source code where I converted a random number generator from a purely functional approach to a monadic approach, but I'm not sure reading it would help you, it's creating the code yourself that will be useful I guess.

Good luck,
Peter Verswyvelen














avid48 wrote:
On 10/14/07, [EMAIL PROTECTED]
I know that asking helpful humans is nicer than reading docs, but the latter
is usually more instructive, and often more efficient.

Sorry, but from my newbie point of view, I think the docs are
sometimes poor and lacking. After seeing the docs, I might want to ask
the list some explanation; if I get a reply pointing me back to the
doc, it doesn't help.
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to