I’m so glad the Clojure team is adding all of these new functions, like update-keys and update-vals. It’s easy to say (as they have in the past), “The implementation is simple, so just write it yourself.” But this leads to a proliferation of implementations that have subtly different semantics and performance characteristics, which makes it hard to move between codebases.
Here’s to adding the rest of weavejester’s medley library to clojure.core! 😉
Example of the new keyword argument / map function call syntax:
I’m so glad the Clojure team is adding all of these new functions, like
update-keysandupdate-vals. It’s easy to say (as they have in the past), “The implementation is simple, so just write it yourself.” But this leads to a proliferation of implementations that have subtly different semantics and performance characteristics, which makes it hard to move between codebases.Here’s to adding the rest of weavejester’s medley library to clojure.core! 😉
Indeed, there were a lot of different implementations of Mapping a function on the values of a map in Clojure on Stack Overflow. I just posted a newer answer pointing people towards
update-valsandupdate-keys.I hadn’t heard of weavejester’s Medley library. Links: source code at GitHub – weavejester/medley; Medley’s API documentation for
map-valsandmap-keys. The library’s other functions look handy.Thanks for posting the links, I should have done that!