user=> (repeatedly 5 (partial shuffle [1 2 3])) ([1 2 3] [1 2 3] [1 2 3] [1 2 3] [3 1 2])
(defn shuffle "Return a random permutation of coll" {:added "1.2"} [coll] (let [al (java.util.ArrayList. coll)] (java.util.Collections/shuffle al) (clojure.lang.RT/vector (.toArray al))))
Comments top
No comments for shuffle. Log in to add a comment.