--- Wolfgang Jeltsch <[EMAIL PROTECTED]> wrote:

> 
> > I think Phil Wadler said it best when he said that a monad is a
> > *computation*.

To be honest, I'm still struggling with the monad concept myself. Oh
sure, I can read the definition and it makes sense. But I'm still
missing that "aha!" moment when it all comes together.

> 
> No, a value of type IO <something> is a computation.  The type IO
> plus (>>=) 
> plus return is a monad.  So is [] plus concatMap plus \x -> [x].


This may be totally off-base, but when I read this, it occured to me
that all I/O is basically a computation made to appear as if it is
something your program "does".  You (or, rather the processor) don't
execute instructions to write "Hello" in same way as, say, adding 2 and
2. Rather, you add writing this string to a "to do" list and wait for a
driver to respond to an interrupt, pick up the request(s), and carry it
(them) out when control passes back the kernel.
> 


===
Gregory Woodhouse  <[EMAIL PROTECTED]>
"Interaction is the mind-body problem of computing."
--Philip L. Wadler
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to