How lazy is DData.Seq?

JP Bernardy jyp_7 at
Sun May 9 04:40:07 EDT 2004

--- Dylan Thurston <dpt at>

> Yes, but DData.Seq is supposed to be a
> general-purpose library, and I,
> for one, want most operations (e.g., lookup) to be
> O(log n).
> If you want unbalanced trees, go ahead and code it
> yourself; it's very
> easy, much easier than doing balancing correctly.
> Peace,
> 	Dylan

Probably you confuse Set and Seq. The latter is not
intended to be "looked up". (Indeed, trees are not
balanced) Thus, Wolfgang request makes perfect sense.

That said, the slight lack of strictness is not
necessary. I introduced it to make some algorithms
simpler (efficient), and thought it was harmless. I is
quite a bit of work to change, thus I am willing to
argue... :)

Please note that append is only strict in the "top
node", and thus it is possible to work with infinite
sequences without error.

Wolfgang, why is it you need the "full laziness"?


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs 

More information about the Libraries mailing list