map
function
rewrite-clj.zip/map
(map [f zloc])Returns `zloc` with function `f` applied to all nodes of the current node.
Current node must be a sequence node. Equivalent to [[rewrite-clj.zip/map-vals]] for maps.
`zloc` location is unchanged.
`f` arg is zloc positioned at
- value nodes for maps
- each element of a seq
and is should return:
- an updated zloc with zloc positioned at edited node
- a falsey value to leave value node unchanged
Folks typically use [[edit]] for `f`.
Examples
No examples yet. Be the first to add one!