Lauri Pesonen a écrit :
> You can use a pair of lists to implement a queue where the first list
> is used to dequeue items from and the second list is used to enqueue
> items to. When the first queue is empty, you replace it with a
> reversed version of the second queue.
>   
Or you can use a seq and a vector like clojure.lang.PersistentQueue does 
thus you won't need to reverse the vector but the queue will retain 
references on dequeued items for some time (until the current seq is empty).

Christophe

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