On Aug 13, 2007, at 16:29 , Benjamin Franksen wrote:
Let's take the simplest example: Maybe. The effect in question is the
premature abortion of a computation (when Nothing is returned). And of
course Maybe sequences these effects, that's what you use it for: the
_first_ action to be encountered that returns Nothing aborts the
computation. Clearly sequencing goes on here.
Clearly it does, but not as a side effect of the *monad*. It's
ordinary Haskell data dependencies at work here, not some mystical
behavior of a monad.
What about State? The effect is reading/writing the state. Again,
the State
Monad takes care that these effects get sequenced, and again that's
what
you expect it to do for you.
No, I expect it to carry a value around for me. If I carry that
value around myself instead of relying on the monad to do it for me,
*the calculation still gets sequenced by the data dependencies*.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe