Created
November 8, 2011 21:41
-
-
Save anonymous/1349340 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| ; the behavior I want | |
| (fn [thread posts] {:thread thread | |
| :posts posts}) | |
| ; my solution | |
| (defn map-from-args [& args] | |
| (fn [& args-] | |
| (zipmap args args-))) | |
| ((map-from-args :thread :posts) 1 2) | |
| ; {:posts 2, :thread 1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment