ryoakg
5/21/2016 - 11:13 PM

unquote-splicing-map.clj

(defmacro test [a b]
  `(~a ~@b))

(clojure.walk/macroexpand-all '(test 0 {:a 1 :b 2}))
;; => (0 [:a 1] [:b 2])


(defmacro test2 [a b]
  `(~a ~@(flatten (into [] b))))

(clojure.walk/macroexpand-all '(test2 0 {:a 1 :b 2}))
;; => (0 :a 1 :b 2)