[Haskell-cafe] Re: Doubly-linked zipper list w/ insert implementation

Justin Bailey jgbailey at gmail.com
Wed Nov 7 17:48:44 EST 2007

On Nov 7, 2007 10:16 AM, apfelmus <apfelmus at quantentunnel.de> wrote:

> Do you really need to realize the cycle by sharing? I mean, sharing
> doesn't go well with insertion / updates / deletion since each of these
> operations breaks it and needs to restore it everywhere. In other words,
> your  insert  takes O(n) time. I'd simply drop the sharing and use two
> double ended queues (or something like that) instead

Very good point, and much easier to implement with Data.Sequence to
boot. All that circular programming made my brain hurt.

Thanks for your feedback.


More information about the Haskell-Cafe mailing list