• (rand-elt s)
DEPRECATED. Prefer clojure.core/rand-nth.
Return a random element of this seq

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/seq.clj:160 top

(defn rand-elt
  "DEPRECATED. Prefer clojure.core/rand-nth.
   Return a random element of this seq"
  {:deprecated "1.2"}
  [s]
  (nth s (rand-int (count s))))
Vars in clojure.contrib.seq/rand-elt: count defn nth rand-int
Used in 0 other vars

Comments top

No comments for rand-elt. Log in to add a comment.