As per the other thread, remember that in Clojure sorted collections only function properly when given a function that obeys the trichotomy property (exactly one of the following hold: a<b or a=b or b<a). <= is not a valid function for Clojure's sorted collections, including priority-map. You have to use something like <.
On Wed, Nov 21, 2012 at 6:08 PM, JvJ <[email protected]> wrote: > I'm not sure if this is an error or not, but priority-maps behaves > strangely when given a function like <=. > > (pop (priority-map-by <= :a 1 :b 2 :c 3)) > => {:a 1 :b 2 :c 3} ;; First element isn't popped. > > Is this supposed to happen? > > -- > 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 -- 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
