take-last

functionsince v0.0-927 clojure.core/take-lastEdit
(take-last n coll)

Details:

Returns a sequence of the last n items in coll.

Depending on the type of collection, take-last may be no faster than linear time. For vectors, please use subvec.


See Also:


Source docstring:
Returns a seq of the last n items in coll.  Depending on the type
of coll may be no better than linear time.  For vectors, see also subvec.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn take-last
  [n coll]
  (loop [s (seq coll), lead (seq (drop n coll))]
    (if lead
      (recur (next s) (next lead))
      s)))