function | since v0.0-927 | clojure.core/dissoc | Edit |
(dissoc coll)
(dissoc coll k)
(dissoc coll k & ks)
dissoc(iate)
Returns a new map that does not contain a mapping for key(s).
Has no effect on the map type (hashed/sorted).
(dissoc {:key "value" :key2 "value2"} :key)
;;=> {:key2 "value2"}
dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s).
(defn dissoc
([coll] coll)
([coll k]
(when-not (nil? coll)
(-dissoc coll k)))
([coll k & ks]
(when-not (nil? coll)
(let [ret (dissoc coll k)]
(if ks
(recur ret (first ks) (next ks))
ret)))))