FWIW you can simplify the nested doseqs like this
(doseq [[outer-keys collections] m
[collection-name collection] collections
[string-id data] collection]
;; do stuff with the above
)
HTH,
/thomas
On Wednesday, December 4, 2013 12:05:14 AM UTC+1, Ryan wrote:
>
> Hi all,
>
> I am trying to figure out a better way to loop the following map than
> using nested doseq. The map has the following structure:
>
> (def m
>> {"outerKeyA" {:innerKeyA {"string id" {:foo 1 :bar 2}}}
>> "outerKeyB" {:innerKeyB {"string id" {:bar 5 :baz 10}}}})
>
>
> So, right now i am doing the following:
>
> (doseq [[outer-keys collections] m]
>> (doseq [[collection-name collection] collections]
>> (doseq [[string-id data] collection]
>> ;; do stuff with all the above
>> )))
>
>
> Is there a more idiomatic/better way to do deeply nested
> iterations/traversal of map of maps?
>
> Thank you for any replies!
>
> Ryan
>
>
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.