Created
December 9, 2015 04:27
-
-
Save matstani/00c29777685713b09ac5 to your computer and use it in GitHub Desktop.
process nested map in clojure.
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
(def divisions | |
{:division1 | |
{:group1 [:staff1 :staff2] | |
:group2 [:staff3 :staff4 :staff5]} | |
:division2 | |
{: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