nthrest

clojure.core

  • (nthrest coll n)
Returns the nth rest of coll, coll when n is 0.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:2755 top

(defn nthrest
  "Returns the nth rest of coll, coll when n is 0."
  {:added "1.3"
   :static true}
  [coll n]
    (loop [n n xs coll]
      (if (and (pos? n) (seq xs))
        (recur (dec n) (rest xs))
        xs)))
Vars in clojure.core/nthrest:
Used in 0 other vars

Comments top

No comments for nthrest. Log in to add a comment.