Created
July 29, 2016 02:56
-
-
Save RutledgePaulV/43ee857ff0d7c97dc23bf475a82d1a5c to your computer and use it in GitHub Desktop.
Macro to convert variadic provided symbols into a map of symbol-turned-keyword -> symbol-value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro map-symbols [& symbols] | |
"Converts variadic provided symbols into a map of symbol-turned-keyword -> symbol-value" | |
(into {} (map #(hash-map (keyword (name %)) (var-get (resolve %))) symbols))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment