Skip to content

clojure.core/sort

View this page on ClojureDocs

Type: function Added: Clojure 1.0 Examples: 7 Runnable: 1
([coll] [comp coll])

Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement java.util.Comparator. Guaranteed to be stable: equal elements will not be reordered. If coll is a Java array, it will be modified. To avoid this, sort a copy of the array.

Examples

by zmila on . May have evaluation errors.
by yasuto on . May have evaluation errors.
by jafingerhut on . May have evaluation errors.
by ferdinand-beyer on . May have evaluation errors.
by Invertisment on . May have evaluation errors.
by ertugrulcetin on
by malloryerik on . May have evaluation errors.

See also


Content from the matching ClojureDocs page, with authors credited on each contribution.