Skip to content

Instantly share code, notes, and snippets.

@eightysteele
Last active December 10, 2015 02:28
Show Gist options
  • Save eightysteele/4367759 to your computer and use it in GitHub Desktop.
Save eightysteele/4367759 to your computer and use it in GitHub Desktop.
WIP.
;; via @sritchie, master butcher:
(defn beast-mode [m]
(let [zip (partial map vector)
[ks v-colls] (apply zip m)]
(for [vs (apply zip v-colls)]
(zipmap ks vs))))
(comment
(let [partitions {:title ["a" "b" "c"] :links [1 2 3] :name [:aaron :tina :noah]}]
(beast-mode partitions)))
;; => ({:name :aaron, :title "a", :links 1} {:name :tina, :title "b", :links 2} {:name :noah, :title "c", :links 3})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment