boolean (@NotNull PsiPolyadicExpression expression, boolean isNegated, PsiExpression... toEliminate) { if (!isMultiplicative(expression.getOperationTokenType())) return false; return StreamEx.of(expression.getOperands()).foldLeft(isNegated, (result, op) -> isNegated(op, result, toEliminate)); }