<br><br><div class="gmail_quote">2011/2/5 Dean Herington <span dir="ltr">&lt;<a href="mailto:heringtonlacey@mindspring.com">heringtonlacey@mindspring.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<div><div class="im"></div><div>In your simplified example, it suffices to wrap
unsafeInterleaveIO around (mapM content ds).  In a more realistic
case, you&#39;d need to add some `unsafeInterleaveIO`s in `files` and
`directories`, too.</div>
</div></blockquote><div><br>Thanks a lot! Now it was easy to write a lazy findFiles.<br>Would one have to write down a lot in order to see &quot;on paper&quot; why the original example was not lazy? If I coud do this, I might run into fewer problems in the future.<br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><font color="#888888">
<div>Dean</div>
</font><div><br></div>
<div>P.S. You might also want to look into iteratees, which accomplish
a similar goal in a more robust way.</div></div></blockquote><div> </div><div>Yes, I already looked over the article in Monad reader #16. But then I thaught I will first gain more understanding of the traditional way and then return to iteratees.<br>
</div></div><br><br>Regards<br>Tim<br><br>