Liking cljdoc? Tell your friends :D

io.randomseed.utils.map

Random utils, map utilities.

Random utils, map utilities.
raw docstring

assoc-existingclj

(assoc-existing)
(assoc-existing coll)
(assoc-existing coll k val)
(assoc-existing coll k val & more)

Associates keys and values only if the keys exist in a map.

Associates keys and values only if the keys exist in a map.
sourceraw docstring

assoc-ifcljmacro

(assoc-if coll pred k val)
source

assoc-if-keycljmacro

(assoc-if-key coll k pred val)
source

assoc-if-notcljmacro

(assoc-if-not coll pred k val)
source

assoc-if-not-keycljmacro

(assoc-if-not-key coll k pred val)
source

assoc-missingclj

(assoc-missing)
(assoc-missing coll)
(assoc-missing coll k val)
(assoc-missing coll k val & more)

Associates keys and values only if the keys do not yet exist in a map.

Associates keys and values only if the keys do not yet exist in a map.
sourceraw docstring

dissoc-ifclj

(dissoc-if m k pred)
source

dissoc-inclj

(dissoc-in m [k & ks :as keys])

Like assoc-in but removes entries. Leaves empty maps.

Like assoc-in but removes entries. Leaves empty maps.
sourceraw docstring

duplicate-keysclj

(duplicate-keys map kmap)

Returns the map with the keys in kmap duplicated under new names according to the vals in kmap.

Returns the map with the keys in kmap duplicated under new names according to the
vals in kmap.
sourceraw docstring

invert-in-setsclj

(invert-in-sets m)
(invert-in-sets m dst)

Like clojure.set/map-invert but preserves all possible values in sets.

Like `clojure.set/map-invert` but preserves all possible values in sets.
sourceraw docstring

lazy-getcljmacro

(lazy-get m k exp)

Like get but the default value is an expression that is going to be evaluated only if the associative structure does not contain the given key.

Like get but the default value is an expression that is going to be evaluated only
if the associative structure does not contain the given key.
sourceraw docstring

map-keysclj

(map-keys f m)
(map-keys f m dst)

For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with keys updated by results returned by the function. When the third argument is given then it should be a map on which operations are performed instead of using an empty map.

For each key and value of the given map m calls a function passed as the first
argument (passing successive keys during calls to it) and generates a map with keys
updated by results returned by the function. When the third argument is given then
it should be a map on which operations are performed instead of using an empty
map.
sourceraw docstring

map-keys-and-valsclj

(map-keys-and-vals f m)
(map-keys-and-vals f m dst)

For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with keys updated by results returned by the function and values also updated by results of the same function. The function should return a sequential collection of 2 elements: first containing a new value of a key and second containing a new value of a transformed value associated with that key. When the third argument is given then it should be a map on which operations are performed instead of using an empty map.

For each key and value of the given map m calls a function passed as the first
argument (passing successive keys during calls to it) and generates a map with keys
updated by results returned by the function and values also updated by results of
the same function. The function should return a sequential collection of 2
elements: first containing a new value of a key and second containing a new value
of a transformed value associated with that key. When the third argument is given
then it should be a map on which operations are performed instead of using an empty
map.
sourceraw docstring

map-keys-by-vclj

(map-keys-by-v f m)
(map-keys-by-v f m dst)

For each key and value of the given map m calls a function passed as the first argument (passing successive values during calls to it) and generates a map with keys updated by results returned by the function. When the third argument is given then it should be a map on which operations are performed instead of using and empty map.

For each key and value of the given map m calls a function passed as the first
argument (passing successive values during calls to it) and generates a map with
keys updated by results returned by the function. When the third argument is
given then it should be a map on which operations are performed instead of using
and empty map.
sourceraw docstring

map-of-sets-invertclj

(map-of-sets-invert m)

Like clojure.set/map-invert but for map of sets (as values) to preserve all possible values (as keys of newly created map).

Like `clojure.set/map-invert` but for map of sets (as values) to preserve all
possible values (as keys of newly created map).
sourceraw docstring

map-of-vectors-invert-flattenclj

(map-of-vectors-invert-flatten m)

Like clojure.set/map-invert but for map of vectors (as values). Duplicated keys are replaced.

Like `clojure.set/map-invert` but for map of vectors (as values). Duplicated keys
are replaced.
sourceraw docstring

map-valsclj

(map-vals f m)
(map-vals f m dst)

For each key and value of the given map m calls a function passed as the first argument (passing successive values during calls to it) and generates a map with values updated by results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.

For each key and value of the given map m calls a function passed as the first
argument (passing successive values during calls to it) and generates a map with
values updated by results returned by the function. When the third argument is
given it should be a map on which operations are performed instead of using the
original map. This may be helpful when we want to avoid merging the results with
another map.
sourceraw docstring

map-vals-by-kclj

(map-vals-by-k f m)
(map-vals-by-k f m dst)

For each key and value of the given map m calls a function passed as the first argument (passing successive keys during calls to it) and generates a map with values updated by results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.

For each key and value of the given map m calls a function passed as the first
argument (passing successive keys during calls to it) and generates a map with
values updated by results returned by the function. When the third argument is
given it should be a map on which operations are performed instead of using the
original map. This may be helpful when we want to avoid merging the results with
another map.
sourceraw docstring

map-vals-by-kvclj

(map-vals-by-kv f m)
(map-vals-by-kv f m dst)

For each key and value of the given map m calls a function passed as the first argument (passing successive keys and values during calls to it) and generates a map with values updated by results returned by the function. When the third argument is given it should be a map on which operations are performed instead of using the original map. This may be helpful when we want to avoid merging the results with another map.

For each key and value of the given map m calls a function passed as the first
argument (passing successive keys and values during calls to it) and generates a
map with values updated by results returned by the function. When the third
argument is given it should be a map on which operations are performed instead of
using the original map. This may be helpful when we want to avoid merging the
results with another map.
sourceraw docstring

map-valuesclj

(map-values f coll)

Recursively transforms values of a map coll using function f. The function should take a value and return new value.

Recursively transforms values of a map coll using function f. The function should
take a value and return new value.
sourceraw docstring

nil-existing-keysclj

(nil-existing-keys m keys)
source

nil-keysclj

(nil-keys m keys)
source

remove-empty-valuesclj

(remove-empty-values m)
source

remove-exceptclj

(remove-except m keyseq)
source

remove-if-valueclj

(remove-if-value m pred)
source

remove-if-value-inclj

(remove-if-value-in m vals)
source

remove-if-value-not-inclj

(remove-if-value-not-in m vals)
source

update-bytes-to-stringsclj

(update-bytes-to-strings coll k)
(update-bytes-to-strings coll k & keys)
source

update-existingclj

(update-existing coll k fun)
(update-existing coll k fun & more)

Updates the key k of the given collection coll by calling a function fun and passing optional arguments specified as additional arguments. Will not perform any update if the given key does not exist within the collection. Returns a collection.

Updates the key k of the given collection coll by calling a function fun and passing
optional arguments specified as additional arguments. Will not perform any update
if the given key does not exist within the collection. Returns a collection.
sourceraw docstring

update-ifclj

(update-if coll k pred fun & more)
source

update-if-notclj

(update-if-not coll k pred fun & more)
source

update-missingclj

(update-missing coll k fun)
(update-missing coll k fun & more)
source

update-to-bytesclj

(update-to-bytes coll k)
(update-to-bytes coll k & keys)
source

update-valuesclj

(update-values map vmap)
(update-values map vmap create-keys?)
(update-values map vmap create-keys? remove-key-mark)

Returns the map with its values identified with keys from vmap updated with the associated functions from vmap.

Returns the map with its values identified with keys from vmap updated with the
associated functions from vmap.
sourceraw docstring

update-values-or-seqsclj

(update-values-or-seqs map vmap)
(update-values-or-seqs map vmap create-keys?)

Returns the map with its values identified with keys from vmap updated with the associated functions from vmap.

Returns the map with its values identified with keys from vmap updated with the
associated functions from vmap.
sourceraw docstring

update-values-or-seqs-recurclj

(update-values-or-seqs-recur map vmap)
(update-values-or-seqs-recur map vmap create-keys?)

Returns the map with its values identified with keys from vmap recursively updated with the associated functions from vmap. Shape is not reflected, second map (vmap) should be flat, searching for keys is recursive, including nested vectors.

Returns the map with its values identified with keys from vmap recursively updated
with the associated functions from vmap. Shape is not reflected, second map (vmap)
should be flat, searching for keys is recursive, including nested vectors.
sourceraw docstring

update-values-recurclj

(update-values-recur map vmap)
(update-values-recur map vmap create-keys?)

Returns the map with its values identified with keys from vmap recursively updated with the associated functions from vmap. Shape is not reflected, second map (vmap) should be flat, searching for keys is recursive, including nested vectors.

Returns the map with its values identified with keys from vmap recursively updated
with the associated functions from vmap. Shape is not reflected, second map (vmap)
should be flat, searching for keys is recursive, including nested vectors.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close