clojure.core/reverse¶
Returns a seq of the items in coll in reverse order. Not lazy.
Examples¶
Note by gstamp¶
If you've got a vector rseq is a good option instead of reverse.
Note by Crowbrammer¶
For vectors, rseq is to reverse what peek is to last. rseq reverses in constant time (!) where reverse is in linear time, as it appears to pull everything into a new seq, one at a time instead of ... reversing the keys? I don't know the implementation details, but I do know that rseq is magnitudes faster than reverse for vectors and sorted maps.
See also¶
Content from the matching ClojureDocs page, with authors credited on each contribution.