find()
find<
T>(node,predicate):Option<T>
Finds the first node matching a predicate (depth-first). Short-circuits on first match.
Type Parametersβ
T: Tβ
The data type
Parametersβ
node: Composite<T>β
The root node to search
predicate: (data) => booleanβ
Function to test each node
Returns: Option<T>β
Option containing the matching node data
Sinceβ
2.4.0