(smart-update m path f)
Like update, but can handle arrays as well. If the value at any point in path is an array, will map over the array, continuing the path. Example: (smart-update {:a [{:b [{:c 10} {:c 20} {:d 100}]}]} [:a :b :c] inc) would result in {:a [{:b [{:c 11} {:c 21} {:d 100}]}]}.
Like update, but can handle arrays as well. If the value at any point in path is an array, will map over the array, continuing the path. Example: (smart-update {:a [{:b [{:c 10} {:c 20} {:d 100}]}]} [:a :b :c] inc) would result in {:a [{:b [{:c 11} {:c 21} {:d 100}]}]}.
(update-all m f)
Update all top-level keys of m with f.
Update all top-level keys of m with f.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close