I would like to see a more concise solution using clojure.walk , but here is one that uses a recursive function and mapcat :
(defn remove-vectors [coll] (mapcat (fn [x] (cond (vector? x) nil (coll? x) (list (remove-vectors x)) :else (list x))) coll))
And the one that uses filter and map :
(defn remove-vectors [coll] (map #(if (coll? %) (remove-vectors %) %) (remove vector? coll)))
source share