On Oct 10, 8:40 pm, samppi <rbysam...@gmail.com> wrote: > (defn transform-map [f a-map] > (into {} (map #(vector (key %) (f (val %))) a-map)))
I always find map transformations easier to write with reduce: (defn transform-map [f mm] (reduce (fn [m [k v]] (assoc m k (f v))) {} mm)) -SS --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---