[Haskell-cafe] Bracket around every IO computation monad
Felipe Almeida Lessa
felipe.lessa at gmail.com
Mon Nov 15 19:25:41 EST 2010
On Mon, Nov 15, 2010 at 10:15 PM, Mitar <mmitar at gmail.com> wrote:
> True. Approach with "operational" is really beautiful. And it is
> really great when you want things done. But for me, Haskell novice who
> wants to learn more, it hides too much. So it is probably something I
> would use in my code, but on the other hand I would like an exercise
> of doing things by hand. So first 100 monads by hand and then such
> libraries are useful, but also you exactly understand what are they
> doing - what are they automating, which process you have been doing by
> hand before.
That's true, doing it yourself manually helps to see that there's no
magic under the hood =).
After implementing the monad, I would suggest trying to prove that the
monad laws hold [1]. Sometimes you think you have a monad but you
don't [2].
[1] http://www.haskell.org/haskellwiki/Monad_Laws
[2] http://blog.sigfpe.com/2006/11/why-isnt-listt-monad.html
Cheers!
--
Felipe.
More information about the Haskell-Cafe
mailing list