(into-ordered-set items)
(ordered-set)
(ordered-set & xs)
Return a set with the given items, whose items are sorted in the order that they are added. conj'ing an item that was already in the set leaves its order unchanged. disj'ing an item and then later conj'ing it puts it at the end, as if it were being added for the first time. Supports transient.
Note that clojure.set functions like union, intersection, and difference can change the order of their input sets for efficiency purposes, so may not return the order you expect given ordered sets as input.
Return a set with the given items, whose items are sorted in the order that they are added. conj'ing an item that was already in the set leaves its order unchanged. disj'ing an item and then later conj'ing it puts it at the end, as if it were being added for the first time. Supports transient. Note that clojure.set functions like union, intersection, and difference can change the order of their input sets for efficiency purposes, so may not return the order you expect given ordered sets as input.
(transient-ordered-set os)
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |