<div dir="ltr"><div>I don't really see how recursing into some other inits function would help. The same laziness requirement should hold everywhere:<br><br>take (n+1) $ inits ([1 .. n] ++ undefined)  =  inits [1 .. n]<br>
<br></div>Maybe I don't understand what you mean properly.<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 19, 2014 at 4:29 AM, Henning Thielemann <span dir="ltr"><<a href="mailto:schlepptop@henning-thielemann.de" target="_blank">schlepptop@henning-thielemann.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 19.07.2014 10:25, schrieb David Feuer:<div class=""><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'm not sure about the theory of it, but if I load the module in GHCi<br>
and run<br>
head $ last $ initsR [0..100000::Int]<br>
I get a response *immediately*.<br>
If I run<br>
head $ last $ initsDL [0..100000::Int]<br>
I wrote this email while waiting for that to complete, and gave up on<br>
it. There may be an asymptotic performance bug here.<br>
</blockquote>
<br></div>
Sorry, I got the implementation of initsDL wrong (recursed into the wrong inits-function).<br>
<br>
</blockquote></div><br></div>