fun foo(list: List) { val sum = 0 for (s in list) { val x = s.calcSomething() if (x > 0) { sum += x } } }