function | since v0.0-927 | clojure.core/to-array | Edit |
(to-array coll)
Returns an array containing the contents of coll.
(defn to-array
[coll]
(let [ary (array)]
(loop [s (seq coll)]
(if-not (nil? s)
(do (. ary push (first s))
(recur (next s)))
ary))))