nthrest

functionsince v0.0-2411 clojure.core/nthrestEdit
(nthrest coll n)

Details:

Returns the nth rest of coll.

Returns coll when n is 0.


See Also:


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