ES6 object property shorthand with Clojure
Same as with Groovy beforehand:
(defmacro map-of [& xs] `(hash-map ~@(mapcat (juxt keyword identity) xs))) (let [a 1 b 2] (println (map-of a b))) ; {:b 2, :a 1}
Same as with Groovy beforehand:
(defmacro map-of [& xs] `(hash-map ~@(mapcat (juxt keyword identity) xs))) (let [a 1 b 2] (println (map-of a b))) ; {:b 2, :a 1}