;;; a concise and performant way to concat into a vector
(into [] cat [[1 2 3] [4] [5 6 7]])
;; => [1 2 3 4 5 6 7]
(defn concatv
"Concatenate `xs` and return the result as a vector."
[& xs]
(into [] cat xs))
(concatv '(1 2) [3] [4 5])
;; => [1 2 3 4 5]
;;; this xducer form is equivalent to the `(vec (concat...` pattern
(let [x [1 2 3]
y 4
z [5 6 7]]
(=
(into [] cat [x [y] z])
(vec (concat x [y] z))))
;; => true