Make it easy to parse & kvs into maps.
Make it easy to parse & kvs into maps.
(coerce coercions m)Accepts two maps. The first map has keys that are keywords and values that are functions that coerce the corresponding value in the second map to the expected type if possible.
If a key in the first map is not present in the second map, it is ignored.
If a key in the second map is not present in the first map, it is passed through unchanged. Returns a new map with the coerced values.
Accepts two maps. The first map has keys that are keywords and values that are functions that coerce the corresponding value in the second map to the expected type if possible. If a key in the first map is not present in the second map, it is ignored. If a key in the second map is not present in the first map, it is passed through unchanged. Returns a new map with the coerced values.
(kvs->map kvs)(kvs->map k v & kvs)Accepts either a sequence of kvs or a vararg paramter list [k v & kvs]
and returns a map with the specified keys mapped to the corresponding values.
In the case of key value collisions, the last kv with the specified k wins.
Accepts either a sequence of `kvs` or a vararg paramter list `[k v & kvs]` and returns a map with the specified keys mapped to the corresponding values. In the case of key value collisions, the last `kv` with the specified `k` wins.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |