Skip to content

Instantly share code, notes, and snippets.

Created November 8, 2011 21:41
Show Gist options
  • Select an option

  • Save anonymous/1349340 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/1349340 to your computer and use it in GitHub Desktop.
; 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