[Haskell-cafe] Re: evaluation semantics of bind

Gregg Reynolds dev at mobileink.com
Thu Feb 5 11:40:34 EST 2009

On Thu, Feb 5, 2009 at 10:26 AM,  <mail at justinbogner.com> wrote:
> x >>= f does not mean "apply f to x", it means "do x, and then do f with
> the result of x". Bind is a sequencing operator rather than an
> application operator.

Sequencing is a side effect of data dependency.  What I should have
said is x >>= f means "evaluate x and f (in any order), /then/ apply f
to x".  In a non-IO monad, x can be discarded if f does not depend on


More information about the Haskell-Cafe mailing list