childrenDepthFirst

Return

a sequence of child nodes of this Tree in depth-first order. The sequence starts with the first child node of this Tree, followed by the first child node of the first child node, and so on.


fun Tree.childrenDepthFirst(predicate: (Tree) -> Boolean): Sequence<Tree>(source)

Return

a sequence of child nodes of this Tree in depth-first order that satisfy the given predicate. The sequence starts with the first child node of this Tree, followed by the first child node of the first child node, and so on.

Parameters

predicate

stops visiting child nodes of the given node once this predicate returns false