Function: -tree-map-nodes
-tree-map-nodes is a byte-compiled function defined in dash.el.
Signature
(-tree-map-nodes PRED FUN TREE)
Documentation
Call FUN on each node of TREE that satisfies PRED.
If PRED returns nil, continue descending down this node. If PRED returns non-nil, apply FUN to this node and do not descend further.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -tree-map-nodes (pred fun tree)
"Call FUN on each node of TREE that satisfies PRED.
If PRED returns nil, continue descending down this node. If PRED
returns non-nil, apply FUN to this node and do not descend
further."
(cond ((funcall pred tree) (funcall fun tree))
((and (listp tree) (listp (cdr tree)))
(-map (lambda (x) (-tree-map-nodes pred fun x)) tree))
(tree)))