<br><font size=2 face="sans-serif">I forgot to send this reponse to haskell-cafe
earlier...</font>
<br>
<br><font size=2 face="sans-serif">Hello,</font>
<br><tt><font size=2><br>
> You mean for the IO monad, right?<br>
> </font></tt>
<br><tt><font size=2>Sorry. I meant divergence is unavoidable for any strict
Monad, such as IO. </font></tt>
<br>
<br><tt><font size=2>However, sequence will always compute over the entire
list; if the resulting computation itself is lazy then the result can be
inspected lazily.</font></tt>
<br><tt><font size=2><br>
> take 10 $ execWriter $ sequence $ repeat $ tell ([3]::[Int])<br>
> <br>
This is a good example. Note that the computation of sequence itself is
infinite.</font></tt>
<br>
<br><tt><font size=2> snd $ runWriter $ sequence (repeat $
tell [3]) >>= return . take 10</font></tt>
<br>
<br><tt><font size=2>will result in an infinite list, but</font></tt>
<br>
<br><tt><font size=2> fst $ runWriter $ sequence (repeat $
tell [3]) >>= return . take 10</font></tt>
<br>
<br><tt><font size=2>will return a 10 element list.</font></tt>
<br>
<br><tt><font size=2>-Jeff</font></tt>
<br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">---</span><br>
<br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">This e-mail may contain confidential and/or privileged information. If you </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">are not the intended recipient (or have received this e-mail in error) </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">please notify the sender immediately and destroy this e-mail. Any </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">unauthorized copying, disclosure or distribution of the material in this </span><br>
<span style="font-family:sans-serif,helvetica; font-size:10pt; color:#000000">e-mail is strictly forbidden.</span><br>