withFunction

fun <T : KoFunctionProvider> List<T>.withFunction(includeNested: Boolean = true, includeLocal: Boolean = true, predicate: (KoFunctionDeclaration) -> Boolean): List<T>

List containing declarations that have at least one function satisfying the provided predicate.

Return

A list containing declarations with at least one function satisfying the predicate.

Parameters

includeNested

Whether to include nested functions.

includeLocal

Whether to include local functions.

predicate

A function that defines the condition to be met by a function declaration.