Last active
August 29, 2015 13:57
-
-
Save llasram/9510281 to your computer and use it in GitHub Desktop.
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 assoc-keys | |
"The inverse of the {:keys [...]} binding form -- assoc the keyword form of | |
each symbol in syms with the bound value of that symbol." | |
[map & syms] `(assoc ~map ~@(mapcat (juxt keyword identity) syms))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment