(defn
to-array-2d
"Returns a (potentially-ragged) 2-dimensional array\n containing the contents of coll."
[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))