On Mon, Nov 09, 2009 at 08:41:25PM -0500, John Harrop wrote: >In the meantime, the main thing still missing from Clojure is a convenient >queue. Lists and vectors both add and remove efficiently only at one end, >and at the same end for add and remove in both cases. Doubly-linked lists >can't be made persistent without massive problems, but laziness has its own >issues:
Perhaps the GHC Data.Sequence library could be ported. It's based on 2-3 finger trees, and allows efficient adding and removal from either end of the sequence. Depending on use behavior, you can also make a decent lazy queue just out a two lists, where you reverse and append whenever the source side fills up. David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---