Last active
December 10, 2015 02:28
-
-
Save eightysteele/4367759 to your computer and use it in GitHub Desktop.
WIP.
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
;; 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