Function: -tree-reduce-from
-tree-reduce-from is a byte-compiled function defined in dash.el.
Signature
(-tree-reduce-from FN INIT-VALUE TREE)
Documentation
Use FN to reduce elements of list TREE.
If elements of TREE are lists themselves, apply the reduction recursively.
FN is first applied to INIT-VALUE and first element of the list, then on this result and second element from the list etc.
The initial value is ignored on cons pairs as they always contain two elements.
Source Code
;; Defined in ~/.emacs.d/elpa/dash-20260221.1346/dash.el
(defun -tree-reduce-from (fn init-value tree)
"Use FN to reduce elements of list TREE.
If elements of TREE are lists themselves, apply the reduction recursively.
FN is first applied to INIT-VALUE and first element of the list,
then on this result and second element from the list etc.
The initial value is ignored on cons pairs as they always contain
two elements."
(declare (important-return-value t))
(cond
((null tree) ())
((-cons-pair? tree) tree)
((consp tree)
(-reduce-r-from
fn init-value
(mapcar (lambda (x) (-tree-reduce-from fn init-value x)) tree)))
(tree)))