hash-ordered-coll computes a collection hash whose result depends on element order. It accepts one argument, coll, which must implement java.lang.Iterable, and returns a java.lang.Long. section 6.6
Use it when ordered collections need hashing compatible with Clojure’s collection-hashing support. Passing nil raises NullPointerException; passing a non-Iterable raises ClassCastException. section 6.6
Order changes the hash
(= (hash-ordered-coll [1 2 3]) (hash-ordered-coll [3 2 1]) (hash-ordered-coll #{1 2 3})) ;; false Unlike hash-unordered-coll, this function distinguishes element order. section 6.6
Listing 6.6. → Hashing function
(hash [x]) (hash-ordered-coll [coll]) (hash-unordered-coll [coll]) (mix-collection-hash [hash-basis count])
Compare the related hashing APIs and their argument shapes. section 6.6
