Tree Data Structure
Toggle table of contents
4.2.0
common
Target filter
common
Switch theme
Search in API
Skip to content
Tree Data Structure
Tree Data Structure
/
com.github.adriankuta.datastructure.tree
/
foldNodes
fold
Nodes
fun
<
T
,
R
>
TreeNode
<
T
>
.
foldNodes
(
initial
:
R
,
operation
:
(
acc
:
R
,
node
:
TreeNode
<
T
>
)
->
R
)
:
R
(
source
)
Folds
operation
over all nodes in pre-order, starting from
initial
.