Useful map utilities
Useful map utilities
(deep-merge & maps)
Deep merge nested maps. Last map has higher priority
This code comes from this gist
Deep merge nested maps. Last map has higher priority This code comes from this [gist](https://gist.github.com/danielpcox/c70a8aa2c36766200a95)
(replace-keys m1 m2)
Replace keys in m2
with keys from m1
. Similiar to merge but non-existen keys in first map won't be added. e.g. (replace-keys {:a 3 :b 2} {:a 1}) -> {:a 3}
Replace keys in `m2` with keys from `m1`. Similiar to merge but non-existen keys in first map won't be added. e.g. (replace-keys {:a 3 :b 2} {:a 1}) -> {:a 3}
(sorted-map-nested m)
Turn map into sorted-map and apply it to all nested submaps.
Turn map into sorted-map and apply it to all nested submaps.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close