Skip to content

Instantly share code, notes, and snippets.

Created Dec 9, 2015
What would you like to do?
process nested map in clojure.
(def divisions
{:group1 [:staff1 :staff2]
:group2 [:staff3 :staff4 :staff5]}
{:group3 [:staff6 :staff7]}})
(for [[d groups] divisions
[g staffs] groups]
[d g staffs])
; ([:division1 :group1 [:staff1 :staff2]] [:division1 :group2 [:staff3 :staff4 :staff5]] [:division2 :group3 [:staff6 :staff7]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment