(assoc-in m ks-v-seq)
(assoc-in m ks v)
Associates a value in a nested associative structure as with 'clojure.core/assoc-in', but also accepts a sequence of key sequence / value pairs to associate multiple values in one call. If any levels do not exist, hash-maps will be created.
For signature 'm ks v': associates the value v
in the nested associative structure m
at key sequence ks
exactly
as 'clojure.core/assoc-in'. For signature 'm ks-v-seq': behaves as above with ks-v-seq
as a sequence with one or
more sequences of a key sequence and one value to associate multiple values in one call.
Calling (assoc-in m ks v) is equivalent to calling (clojure.core/assoc-in m ks v). Calling (assoc-in m ks-v-seq) is equivalent to calling clojure.core/assoc-in with a reduce function to accumulate the results of associating multiple key sequence / value pairs.
Associates a value in a nested associative structure as with 'clojure.core/assoc-in', but also accepts a sequence of key sequence / value pairs to associate multiple values in one call. If any levels do not exist, hash-maps will be created. For signature 'm ks v': associates the value `v` in the nested associative structure `m` at key sequence `ks` exactly as 'clojure.core/assoc-in'. For signature 'm ks-v-seq': behaves as above with `ks-v-seq` as a sequence with one or more sequences of a key sequence and one value to associate multiple values in one call. Calling (assoc-in m ks v) is equivalent to calling (clojure.core/assoc-in m ks v). Calling (assoc-in m ks-v-seq) is equivalent to calling clojure.core/assoc-in with a reduce function to accumulate the results of associating multiple key sequence / value pairs.
(contains-value? col val)
Returns boolean 'true' if the value val
is contained in the collection col
and 'false' otherwise. For a map,
searches values at the current level only.
Returns boolean 'true' if the value `val` is contained in the collection `col` and 'false' otherwise. For a map, searches values at the current level only.
(dissoc-in m ks)
Disassociates a value in a nested associative structure m
, where ks
is either a sequence of keys or a sequence
of key sequences.
Calling this function where ks
is a sequence of keys is equivalent to removing the property at ks with a combination
of 'update-in' and 'dissoc'. Calling this function with a sequence of a sequence of keys is equivalent to using a
reduce function to accumulate the results from removing multiple sequences of keys using 'update-in' and 'dissoc'.
Disassociates a value in a nested associative structure `m`, where `ks` is either a sequence of keys or a sequence of key sequences. Calling this function where `ks` is a sequence of keys is equivalent to removing the property at ks with a combination of 'update-in' and 'dissoc'. Calling this function with a sequence of a sequence of keys is equivalent to using a reduce function to accumulate the results from removing multiple sequences of keys using 'update-in' and 'dissoc'.
(duplicates? col)
Returns boolean 'true' if the collection col
contains at least one duplicate and 'false' otherwise. For a map,
searches values at the current level only.
Similar to 'clojure.core/distinct?', but its values are taken separately (e.g., not in a collection) while this function operates on collections.
Returns boolean 'true' if the collection `col` contains at least one duplicate and 'false' otherwise. For a map, searches values at the current level only. Similar to 'clojure.core/distinct?', but its values are taken separately (e.g., not in a collection) while this function operates on collections.
(find-duplicates col)
Returns a vector of duplicates found in the collection 'col'. If no duplicates, then returns an empty vector. For a map, searches values at the current level only.
Returns a vector of duplicates found in the collection 'col'. If no duplicates, then returns an empty vector. For a map, searches values at the current level only.
(not-empty? col)
Returns boolean 'true' if the collection col
is not empty and 'false' otherwise. Suitable for vectors, lists,
maps, and strings. Uses an implementation with the recommended idiom 'seq col' but is more readable, regardless of
experience.
Returns boolean 'true' if the collection `col` is not empty and 'false' otherwise. Suitable for vectors, lists, maps, and strings. Uses an implementation with the recommended idiom 'seq col' but is more readable, regardless of experience.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close