clojure.core/take-last¶
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.
Examples¶
Note by reborg¶
Unlike "drop-last" (but like "last"), "take-last" is not lazy:
(def bomb (take-last 1 (range))) ;; infinite evaluation, never returns (def lazy-bomb (drop-last 1 (range))) ;; good, but don't use!
See also¶
Content from the matching ClojureDocs page, with authors credited on each contribution.