childrenDepthFirst

internal fun Node.childrenDepthFirst(): Sequence<Node>(source)

Return

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


inline fun Node.childrenDepthFirst(crossinline predicate: (Node) -> Boolean): Sequence<Node>(source)

Return

a sequence of child nodes of this Node in depth-first order that satisfy the given predicate. The sequence starts with the first child node of this Node, 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