On 21 Jan 2012, at 21:29, Victor S. Miller wrote:

> The "do" notation translates
> 
> do {x <- a;f}  into
> 
> a>>=(\x -> f)
> 
> However when we're working in the IO monad the semantics we want requires 
> that the lambda expression be strict in its argument.  So is this a special 
> case for IO?  If I wanted this behavior in other monads is there a way to 
> specify that?

No, why? The (>>=) combinator (for the IO monad) is strict on it's first 
argument, that's all. We don't impose any special requirements on the lambda 
expression.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to