ISorted
Source docstring:
Protocol for a collection which can represent their items
in a sorted manner.
(defprotocol ISorted
(^clj -sorted-seq [coll ascending?]
"Returns a sorted seq from coll in either ascending or descending order.")
(^clj -sorted-seq-from [coll k ascending?]
"Returns a sorted seq from coll in either ascending or descending order.
If ascending is true, the result should contain all items which are > or >=
than k. If ascending is false, the result should contain all items which
are < or <= than k, e.g.
(-sorted-seq-from (sorted-set 1 2 3 4 5) 3 true) => (3 4 5)
(-sorted-seq-from (sorted-set 1 2 3 4 5) 3 false) => (3 2 1)")
(-entry-key [coll entry]
"Returns the key for entry.")
(-comparator [coll]
"Returns the comparator for coll."))