Considering the implementation for priority-map-by , it seems to be based on sorted-map-by , which contains the keys that compare them, the same thing. For instance:
(sorted-map-by (fn [[a] [b]] (< ab)) [1 2] :foo [1 3] :bar) => {[1 2] :bar}
This is also true for sorted-set-by :
(sorted-set-by (fn [[a] [b]] (< ab)) [1 2] [1 3] [3 4]) => #{[1 2] [3 4]}
What is the intentional behavior for priority-map-by , you should ask the author. I think this is reasonable.
source share