You're viewing version 1.2.0 of reverse. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

reverse

clojure.core

  • (reverse coll)
Returns a seq of the items in coll in reverse order. Not lazy.

1 Example top

  • user=> (reverse '(1 2 3))
    (3 2 1)
    
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/rseq

    Returns, in constant time, a seq of the items in rev (which can be

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:802 top

(defn reverse
  "Returns a seq of the items in coll in reverse order. Not lazy."
  {:added "1.0"}
  [coll]
    (reduce conj () coll))
Vars in clojure.core/reverse: conj defn reduce

Comments top

1 comment(s) for reverse.

If you've got a vector rseq is a good option instead of reverse.

Log in to add a comment.