Yeah, this is what I ended up with so far: ``` ...
# kontributors
j
Yeah, this is what I ended up with so far:
Copy code
fun enumerateContainedExpressions(handler: (Expression) -> Unit) {
        this.childExpressions.forEach(handler)
    }

    inline fun <reified CHILD_CLASS: Expression> enumerateContainedExpressionsOfType(noinline handler: (CHILD_CLASS) -> Unit) = {
        this.enumerateContainedExpressions { childExpression ->
            if (childExpression is CHILD_CLASS) {
                handler(childExpression)
            }
        }
    }