[Haskell-cafe] Lazy lists simulated by unboxed mutable arrays

Henning Thielemann lemming at henning-thielemann.de
Wed May 28 05:24:49 EDT 2008


On Wed, 28 May 2008, Ketil Malde wrote:

> Bulat Ziganshin <bulat.ziganshin at gmail.com> writes:
>
>> well, i don't understand difference between your idea and lazybs
>> implementation
>
> HT said earlier that:
>
>>> This would still allow the nice tricks for recursive Fibonacci
>>> sequence definition.
>
> Which I guess refers to something like:
>
>  fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
>
> I don't think you can do that with LBS, since you'd need to calculate
> a whole chunk at a time, and for any chunk size > 1, each chunk
> depends on itself.

Right, that's what I meant.



More information about the Haskell-Cafe mailing list