use collectFirst instand of a var and iterate

Your point about the for comprehension is incorrect in that, without a `yield`, it actually turns into a foreach, which expands lazy iterators:

`for (i <- Iterator(1, 2,3) { println(i) }`

works as expected.