On Mon, Nov 9, 2009 at 10:37 PM, Mark Engelberg <mark.engelb...@gmail.com>wrote:

> Yes, it's in Clojure 1.0, it just doesn't have a convenient name.
>
> So give it a convenient name like this:
> (def empty-queue clojure.lang.PersistentQueue/EMPTY)
>
> and then you're ready to go.
>
> conj, peek, pop, into and all the other sequence-based functions work
> the way you'd expect.
>
> The implementation cleverly uses a list for the first part of the
> queue, and a vector for the second part of the queue, and is efficient
> and persistent.


How does it efficiently deal with when the list-part has been completely
consumed?

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to