`update-in` could be helpful, depending on what exactly you're doing.
(doseq [keyA keys, keyB otherkeys]
(update-in m [keyA keyB] some-function))
On Tuesday, December 3, 2013 6:05:14 PM UTC-5, 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.