[Haskell-cafe] Monads, do and strictness

Victor S. Miller victorsmiller at gmail.com
Sat Jan 21 18:29:32 CET 2012

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?


Sent from my iPhone

More information about the Haskell-Cafe mailing list