(index-maps k ms)
(index-maps key-proc k ms)
derives a map from a mapseq (sequence of maps).
utilizes an index specified by key, k
, as keys for the resulting map.
indexed maps need not be unique. returned maps are grouped in a list for each unique index.
an optional key-proc
parameter is provide to allow key processing of each indexing key
(such as forcing the case of each index via clojure.string/lower-case, for example).
derives a map from a mapseq (sequence of maps). utilizes an index specified by key, `k`, as keys for the resulting map. indexed maps need not be unique. returned maps are grouped in a list for each unique index. an optional `key-proc` parameter is provide to allow key processing of each indexing key (such as forcing the case of each index via clojure.string/lower-case, for example).
(index-unique-maps k ms)
(index-unique-maps key-proc k ms)
derives a map from a mapseq (sequence of maps).
utilizes an index specified by key, k
, as keys for the resulting map.
assumes that each indexed map value is unique.
when duplicate keys are present, last duplicate keyed map will be present in result.
the optional key-proc
parameter allows key processing of each indexing key
(such as forcing the case of each index via clojure.string/lower-case, for example).
derives a map from a mapseq (sequence of maps). utilizes an index specified by key, `k`, as keys for the resulting map. assumes that each indexed map value is unique. when duplicate keys are present, last duplicate keyed map will be present in result. the optional `key-proc` parameter allows key processing of each indexing key (such as forcing the case of each index via clojure.string/lower-case, for example).
(keys->camelCase form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into camelCase style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into camelCase style keywords. preserves any namespaces in existing keyword keys.
(keys->HTTP-Header-Case form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into HTTP-Header-Case style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into HTTP-Header-Case style keywords. preserves any namespaces in existing keyword keys.
(keys->kebab-case form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into kebab-case style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into kebab-case style keywords. preserves any namespaces in existing keyword keys.
(keys->kebabs form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into kebab-case style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into kebab-case style keywords. preserves any namespaces in existing keyword keys.
(keys->keywords form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into keywords. preserves any namespaces in existing keyword keys.
(keys->PascalCase form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into PascalCase style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into PascalCase style keywords. preserves any namespaces in existing keyword keys.
(keys->SCREAMING_SNAKE_CASE form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into SCREAMING_SNAKE_CASE style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into SCREAMING_SNAKE_CASE style keywords. preserves any namespaces in existing keyword keys.
(keys->snake_case form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into snake_case style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into snake_case style keywords. preserves any namespaces in existing keyword keys.
(keys->spinal-case form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into kebab-case style keywords. preserves any namespaces in existing keyword keys.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into kebab-case style keywords. preserves any namespaces in existing keyword keys.
(keys->strings form)
deep recursive walk of 'form' via postwalk. converts all hashmap keys into strings. pre-existing namespaces in keyword keys will be lost.
deep recursive walk of 'form' via postwalk. converts all hashmap keys into strings. pre-existing namespaces in keyword keys will be lost.
(proc-keys f form)
deep recursive walk of form
via postwalk. applies function, f
to hashmap keys nested within form
.
form
- input data structure, presumably containing one or more hashmaps
f
- a function of one variable, k
, corresponding to the current hashmap key
deep recursive walk of `form` via postwalk. applies function, `f` to hashmap keys nested within `form`. `form` - input data structure, presumably containing one or more hashmaps `f` - a function of one variable, `k`, corresponding to the current hashmap key
(proc-map f form)
deep recursive walk of form
via postwalk.
each mapentry within form
will be processed via the function f
.
deep recursive walk of `form` via postwalk. each mapentry within `form` will be processed via the function `f`.
(proc-ns-key f k)
use a string processing function, 'f', to process a key, 'k'. also preserves namespace if the k is already a keyword. result will be a keyword.
use a string processing function, 'f', to process a key, 'k'. also preserves namespace if the k is already a keyword. result will be a keyword.
(proc-select-vals f form)
deep recursive walk of form
via postwalk. applies function, f
to hashmap values nested within form
.
form
- input data structure, presumably containing one or more hashmaps
f
- a function of two variables, k
and v
, corresponding to the individual values of the current map entry being processed
deep recursive walk of `form` via postwalk. applies function, `f` to hashmap values nested within `form`. `form` - input data structure, presumably containing one or more hashmaps `f` - a function of two variables, `k` and `v`, corresponding to the individual values of the current map entry being processed
(proc-top-keys f form)
shallow hashmap key processor. applies function, 'f' to hashmap keys within 'form'. 'form' - input hashmap 'f' - a function of one variable, 'k', corresponding to the current hashmap key
shallow hashmap key processor. applies function, 'f' to hashmap keys within 'form'. 'form' - input hashmap 'f' - a function of one variable, 'k', corresponding to the current hashmap key
(proc-top-vals f form)
shallow hashmap key processor. applies function, 'f' to hashmap values within 'form'. 'form' - input hashmap 'f' - a function of one variable, 'v', corresponding to the current hashmap value
shallow hashmap key processor. applies function, 'f' to hashmap values within 'form'. 'form' - input hashmap 'f' - a function of one variable, 'v', corresponding to the current hashmap value
(proc-val f form k)
deep recursive walk of form
.
applies function, f
to process any values for the key k
that are nested within form
.
form
- input data structure, presumably containing one or more hashmaps
f
- a function of one variable, v
, corresponding to the current hashmap value
deep recursive walk of `form`. applies function, `f` to process any values for the key `k` that are nested within `form`. `form` - input data structure, presumably containing one or more hashmaps `f` - a function of one variable, `v`, corresponding to the current hashmap value
(proc-vals f form)
deep recursive walk of form
via postwalk. applies function, f
to hashmap values nested within form
.
form
- input data structure, presumably containing one or more hashmaps
f
- a function of one variable, v
, corresponding to the current hashmap value
deep recursive walk of `form` via postwalk. applies function, `f` to hashmap values nested within `form`. `form` - input data structure, presumably containing one or more hashmaps `f` - a function of one variable, `v`, corresponding to the current hashmap value
(proc-with-map key-fn-map form)
deep recursive walk of form
.
processes map entries by applying a function indexed by key from the given key-fn-map
to the current map entry value.
key-fn-map
should be a hashmap which pairs keys and processing functions.
form
- input data structure, presumably containing one or more hashmaps
deep recursive walk of `form`. processes map entries by applying a function indexed by key from the given `key-fn-map` to the current map entry value. `key-fn-map` should be a hashmap which pairs keys and processing functions. `form` - input data structure, presumably containing one or more hashmaps
(remap-keys m key-map)
similar to select-keys, remap-keys requires a hashmap, key-map, instead of a key-seq. The keys of keymap correspond to keys in 'm', while the values of keymap correspond to keys in the resulting hashmap.
similar to select-keys, remap-keys requires a hashmap, key-map, instead of a key-seq. The keys of keymap correspond to keys in 'm', while the values of keymap correspond to keys in the resulting hashmap.
(rotate coll)
"rotates" a multi-dimensional collection (lazily). stable behavior for equal-length collections.
"rotates" a multi-dimensional collection (lazily). stable behavior for equal-length collections.
(sorted-map-asc m)
create a sorted-map sorting by ascending value from a pre-existing map m
.
create a sorted-map sorting by ascending value from a pre-existing map `m`.
(sorted-map-desc m)
create a sorted-map sorting by descending value from an pre-existing map m
.
create a sorted-map sorting by descending value from an pre-existing map `m`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close