assoc
function
rewrite-clj.zip/assoc
(assoc [zloc k v])Returns `zloc` with current node's `k` set to value `v`.
`zloc` location is unchanged.
`k` should be:
- a key for maps
- a zero-based index for sequences, an exception is thrown if index is out of bounds
NOTE: `k` will be compared against resolved keywords in maps.
See docs for sexpr behavior on [namespaced elements](/doc/01-user-guide.adoc#namespaced-elements).
Examples
No examples yet. Be the first to add one!