Function: -tree-seq
-tree-seq is a byte-compiled function defined in dash.el.
Signature
(-tree-seq BRANCH CHILDREN TREE)
Documentation
Return a sequence of the nodes in TREE, in depth-first search order.
BRANCH is a predicate of one argument that returns non-nil if the passed argument is a branch, that is, a node that can have children.
CHILDREN is a function of one argument that returns the children of the passed branch node.
Non-branch nodes are simply copied.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -tree-seq (branch children tree)
"Return a sequence of the nodes in TREE, in depth-first search order.
BRANCH is a predicate of one argument that returns non-nil if the
passed argument is a branch, that is, a node that can have children.
CHILDREN is a function of one argument that returns the children
of the passed branch node.
Non-branch nodes are simply copied."
(declare (important-return-value t))
(cons tree
(and (funcall branch tree)
(-mapcat (lambda (x) (-tree-seq branch children x))
(funcall children tree)))))