Public Vars

Back

nth (clj)

(source)

function

(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.

Examples