For mapping across maps I often find the following utility helpful:
(defn map-map "Like map, but expects f to produce pairs that are
combined to produce a map output."
[f & maps] (reduce #(conj %1 %2) {} (apply map f maps)))
1:1 user=> (map-map (fn [[k v]] [k (str v " Mark")]) {:greet
"hello" :farewell "goodbye"})
{:farewell "goodbye Mark", :greet "hello Mark"}
-Jason
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---