Agreed. In fact I have the most trouble imagining what Haskell code looked like before monads.<br><br>-deech <br><br><div class="gmail_quote">On Mon, Aug 2, 2010 at 6:34 PM, Richard O&#39;Keefe <span dir="ltr">&lt;<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">The thing that I found hardest to understand about monads is that<br>
they are used to obtain very special consequences (fitting things<br>
like I/O and updatable arrays into a functional language) without<br>
actually involving any special machinery.  Whenever you look for<br>
the magic, it&#39;s nowhere.  But it&#39;s happening none the less.  It&#39;s<br>
really the monad laws that matter; they express _just_ enough of<br>
the informal notion of doing things one after the other to be<br>
useful for side-effective things that need to be done one after<br>
the other without expressing so much that they preclude<br>
informally pure things like lists and maybes.<br>
<br>
There&#39;s a thing I&#39;m still finding extremely hard about monads,<br>
and that&#39;s how to get into the frame of mind where inventing<br>
things like Monad and Applicative and Arrows is something I could<br>
do myself.  Functor, yes, I could have invented Functor.<br>
But not the others.<br>
<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>