On Sun, 22 Mar 2009 at 23:27, Jeff Valk wrote:
> Ah, golf... :-)
>
> (defn mapmap [f m]
> (into {} (for [[k v] m] [k (f v)])))
For the record, I think the original approach is the most clear. And it's
actually shorter.
(defn mapmap [f m]
(zipmap (keys m) (map f (vals m))))
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---