ClojureDocs

导航

命名空间

nth

clojure.core

自 1.0 起可用 (源代码)
  • (nth coll 索引)
  • (nth coll 索引 不存在的)
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.