Created
February 1, 2015 04:36
-
-
Save raspasov/499b9aa5d0b0d0b91bf8 to your computer and use it in GitHub Desktop.
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
;looking to transform: | |
(def x ([14227624954630003 3] [14227624954630004 4] [14227624954630005 5] [14227624954630006 6])) | |
;... into: | |
[[14227624954630003 14227624954630004 14227624954630005 14227624954630006] [3 4 5 6]] | |
;anything more idiomatic than: | |
(reduce (fn [result new] | |
[(conj (nth result 0) (nth new 0)) | |
(conj (nth result 1) (nth new 1))]) [[] []] x) | |
;? | |
;thanks :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment