nthnext

functionsince v0.0-927 clojure.core/nthnextEdit
(nthnext coll n)

Details:

Returns the nth next of coll.

Returns (seq coll) when n is 0.


See Also:


Source docstring:
Returns the nth next of coll, (seq coll) when n is 0.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn nthnext
  [coll n]
  (if (implements? IDrop coll)
    (if (pos? n)
      (-drop coll (Math/ceil n))
      (seq coll))
    (loop [n n xs (seq coll)]
      (if (and xs (pos? n))
        (recur (dec n) (next xs))
        xs))))