(merge-with-class & maps)
Like clojure.core/merge but concatenate :class entries.
Source
(defn merge-with-class
"Like clojure.core/merge but concatenate :class entries."
[& maps]
(let [maps (map attributes maps)
classes (mapcat :class maps)]
(when (seq maps)
(cond-> (reduce into {} maps)
(not (empty? classes))
(assoc :class (vec classes))))))