Thanks for the tip. On Tuesday, 20 November 2012 13:13:09 UTC-5, puzzler wrote: > > On Tue, Nov 20, 2012 at 8:01 AM, JvJ <kfjwh...@gmail.com <javascript:>>wrote: > >> Simple solution. It works! Thanks. >> > > No, it doesn't work. It may print correctly now, but it won't actually > behave the way you expect. > > Clojure's sorted collections must be provided with a sorting function > where items "tie" if and only if they are equal. > > (sorted-set-by #(compare [(second %) %] [(second %2) %2]) [:a 1] [:b 1] > [:c 1])) > > Your use case makes me think you might actually want to investigate > clojure.data.priority-map though: > https://github.com/clojure/data.priority-map > If that's a better fit for what you are trying to do, just insert > [org.clojure/data.priority-map "0.0.2"] into your project.clj dependencies. >
-- 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