to-array-2d

functionsince v0.0-1211 clojure.core/to-array-2dEdit
(to-array-2d coll)

Details:

Returns a (potentially-ragged) 2-dimensional JavaScript array containing the contents of coll.


See Also:


Source docstring:
Returns a (potentially-ragged) 2-dimensional array
containing the contents of coll.
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn to-array-2d
  [coll]
    (let [ret (make-array (count coll))]
      (loop [i 0 xs (seq coll)]
        (when-not (nil? xs)
          (aset ret i (to-array (first xs)))
          (recur (inc i) (next xs))))
      ret))