Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created June 9, 2011 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save swannodette/1016073 to your computer and use it in GitHub Desktop.
Save swannodette/1016073 to your computer and use it in GitHub Desktop.
example.clj
(defn do-something [lol]
(let [keys (map #(-> % meta :key) lol)]
(apply map (fn [& xs]
(apply hash-map (interleave keys xs)))
lol)))
(do-something [^{:key :a} [1 2 3] ^{:key :b} [4 5 6]]) ;; ({:a 1, :b 4} {:a 2, :b 5} {:a 3, :b 6})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment