ClojureDocs

Nav

Namespaces

nth

clojure.core

Available since 1.0 (source)
  • (nth coll index)
  • (nth 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.