Not quite, the queue size needs to be passed in at instantiation time for example you may want to have a 10 or 100 element queue depending on the element type. What I'm looking for is to somehow decorate the queue (or some other object) with behavior constraints (a la C++ traits) when the object is created.
Thanks! On Feb 17, 9:36 am, Michael Fogus <[email protected]> wrote: > > Is there a better way to specialize an built-in Clojure collection > > except wrapping - like for example to create a fixed size queue that > > drops new elements while full ? > > You can use protocols as in the example athttps://gist.github.com/831830 > > Is this what you were looking for? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
