store/[org.clojure/clojure "1.8.0"] clj::clojure.core/to-array

Official Documentation

Add notes
Arities
==================================================
   [coll]

Docstring
==================================================
  Returns an array of Objects containing the contents of coll, which
  can be any Collection.  Maps to java.util.Collection.toArray().

Source

(defn to-array
  "Returns an array of Objects containing the contents of coll, which
  can be any Collection.  Maps to java.util.Collection.toArray()."
  {:tag "[Ljava.lang.Object;"
   :added "1.0"
   :static true}
  [coll] (. clojure.lang.RT (toArray coll)))

Example 1

Edit
(to-array [1 2 3])
;; => #<Object[] [Ljava.lang.Object;@3a7e479a>

Example 2

Edit
(def hello (to-array "Hello World!"))

(aget hello 1)
\e

(aset hello 1 \b) ;;Mutability! Watch out!
\b

(dotimes [n (alength hello)] (print (aget hello n)))
Hbllo World!

Uses on crossclj