(apply-kw f & args)
Like apply, but f takes keyword arguments and the last argument is not a seq but a map with the arguments for f
Like apply, but f takes keyword arguments and the last argument is not a seq but a map with the arguments for f
(deep-dissoc m path)
Dissoces the map entry at the path, then recurs through the ancestors, dissocing each ancestor until one is found with a descendent outside the path.
(deep-dissoc {:a {:b {:c {:d 1}}}}
[:a :b :c :d])
This yields an empty map, since each node has a sole descendant.
(deep-dissoc {:a {:x 2 :b {:c {:d 1}}}}
[:a :b :c :d])
This yields {:a {:x 2}}
, since :a
has a descendent :x
outside the path.
Dissoces the map entry at the path, then recurs through the ancestors, dissocing each ancestor until one is found with a descendent outside the path. ``` (deep-dissoc {:a {:b {:c {:d 1}}}} [:a :b :c :d]) ``` This yields an empty map, since each node has a sole descendant. ``` (deep-dissoc {:a {:x 2 :b {:c {:d 1}}}} [:a :b :c :d]) ``` This yields `{:a {:x 2}}`, since `:a` has a descendent `:x` outside the path.
(dissoc-in m [k & ks :as keys])
Dissociates an entry from a nested associative structure returning a new nested structure. keys is a sequence of keys. Any empty maps that result will not be present in the new structure. The key thing is that 'm' remains identical? to itself if the path was never present
Dissociates an entry from a nested associative structure returning a new nested structure. keys is a sequence of keys. Any empty maps that result will not be present in the new structure. The key thing is that 'm' remains identical? to itself if the path was never present
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close