sorted-set-by

clojure.core

  • (sorted-set-by comparator & keys)
Returns a new sorted set with supplied keys, using the supplied comparator.

1 Example top

  • user> (sorted-set-by > 3 5 8 2 1)
    #{8 5 3 2 1}
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:388 top

(defn sorted-set-by
  "Returns a new sorted set with supplied keys, using the supplied comparator."
  {:added "1.1"
   :static true} 
  ([comparator & keys]
   (clojure.lang.PersistentTreeSet/create comparator keys)))
Vars in clojure.core/sorted-set-by:
Used in 0 other vars

Comments top

No comments for sorted-set-by. Log in to add a comment.