it seems like concatted-array
could just be mapcat vs. map
Thx @noisesmith, I'll try mapcat.
Thanks again @noisesmith, great advice!
I just got rid off the concatened-array
function, perfect.
We are now entering nitpick territory (this is very nice), but you could use destructuring in your parse-array function arg list to get rid of the first
and rest
calls and also have clearer naming inside the function
(defn parse-array [[key-list & value-lists]]....
Hi @curlyfry! I like to go to niptick territory and I love the destructuring power, so thank you very much for this advice. 🙂 Very elegant now, perfect!
This is a nitpick as well, but I like to keep keys are strings when I get them from somewhere else. You could (group-by #(get % "id"))
and avoid the keyword-isation...
@jaihindhreddy Yes, like this version too! Thx!