topmostChildren
internal fun <T> TreeNode<T>.topmostChildren(yieldCondition: (TreeNode<T>) -> Boolean): List<TreeNode<T>>
Traverses all children in the tree in depth-first order and returns the top-most nodes that satisfy yieldCondition. This means that if a node satisfies yieldCondition, its children are not traversed, regardless of whether they satisfy yieldCondition or not.