childrenBreadthFirst

Return

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


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

Return

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

Parameters

predicate

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