Liking cljdoc? Tell your friends :D
All platforms.

fireworks.order

This namespace provides a total-ordering comparator for Clojure values.

This namespace provides a total-ordering comparator for Clojure values.
raw docstring

rankclj/s

(rank a b)

Comparator function that provides a total ordering of EDN values. Values of different types sort in order of their types, per type-priority. false is before true, numbers are ordered by magnitude regardless of type, and characters, strings, keywords, and symbols are ordered lexically.

Sequential collections are sorted by comparing their elements one at a time. If the sequences have equal leading elements, the longer one is ordered later. Sets and maps are compared by cardinality first, then elements in sorted order.

All other types are sorted by type name. If the type implements Comparable, the instances of it are compared using compare. Otherwise, the values are ordered by print representation. This has the default behavior of ordering by hash code if the type does not implement a custom print format.

Comparator function that provides a total ordering of EDN values. Values of
different types sort in order of their types, per `type-priority`. `false`
is before `true`, numbers are ordered by magnitude regardless of type, and
characters, strings, keywords, and symbols are ordered lexically.

Sequential collections are sorted by comparing their elements one at a time.
If the sequences have equal leading elements, the longer one is ordered later.
Sets and maps are compared by cardinality first, then elements in sorted
order.

All other types are sorted by type name. If the type implements `Comparable`,
the instances of it are compared using `compare`. Otherwise, the values are
ordered by print representation. This has the default behavior of ordering by
hash code if the type does not implement a custom print format.
sourceraw docstring

seq->sorted-mapclj/s

(seq->sorted-map coll)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close