On Sun, May 3, 2009 at 11:27 AM, Tobias Olausson <span dir="ltr">&lt;<a href="mailto:tobsan@gmail.com">tobsan@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello!<br>
I have a program that is using ST.Strict, which works fine.<br>
However, the program needs to be extended, and to do that,<br>
lazy evaluation is needed. As a result of that, I have switched<br>
to ST.Lazy to be able to do stuff like </blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
foo y = do<br>
    x &lt;- something<br>
    xs &lt;- foo (y+1)<br>
    return (x:xs)</blockquote><div><br>As Ryan points out, this will not do what you want.  But that is incidental, not essential:<br><br>foo y = do<br>     x &lt;- something<br>     fmap (x:) $ foo (y+1)<br><br>Luke</div>
</div><br>