On Tuesday, October 9, 2012 9:14:51 PM UTC+2, Wolodja Wentland wrote: > > --- snip --- > (reduce-kv > (fn [ret k v] > (assoc ret k (func-that-does-something-with v))) > some-map)) > --- snip -- > > I am using reducers in other places, but am not entirely sure how to > employ > them here. I would be grateful for any advice. >
You could use merge as the combine function, and let (fn [ret [k v]] (assoc ret k (func-that-does-something-with v))) be the reducing function you pass to fold. Then it's at least parallelisable, though I'm unsure of its performance. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en