firstScopeOrNull

fun firstScopeOrNull(searchScope: Scope? = currentScope, predicate: Predicate<Scope>): Scope?

This function tries to find the first scope that satisfies the condition specified in predicate. It starts searching in the searchScope, moving up-wards using the Scope.parent attribute.

Parameters

searchScope

the scope to start the search in

predicate

the search predicate