Skip to content

clojure.core/rand-nth

View this page on ClojureDocs

Type: function Added: Clojure 1.2 Examples: 3 Runnable: 0
([coll])

Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the given collection.

Examples

by pkolloch on . May have evaluation errors.
by parkeristyping on . May have evaluation errors.
by jnriver on . May have evaluation errors.

See also


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