<div class='type'>Function</div>


<a id='references'></a>


<h2 id="traversechildren-key-block">traverseChildren</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun DelegatableNode.traverseChildren(key: Any?, block: (TraversableNode) -> Boolean)
```


Executes `block` for all direct children of the node with a matching `key`.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter `block`'s return boolean value will determine if the traversal will
continue (true = continue, false = cancel).





<hr class="docs-overload-divider">


<h2 id="traversechildren-block-t">traverseChildren</h2>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun <T> T.traverseChildren(block: (T) -> Boolean) where T : TraversableNode
```


Executes `block` for all direct children of the node that are of the same class.

Note 1: This stops at the children and does not include grandchildren and so on down the tree.

Note 2: The parameter `block`'s return boolean value will determine if the traversal will
continue (true = continue, false = cancel).