Skip to main content

nth

functionv1.0

clojure.core/nth

Available in:BBCLJCLJS
(nth [coll index] [coll index not-found])
Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences.

No examples yet. Be the first to add one!