@dotta, I don't think this is working.
If I remember unwrapping for comprehension correctly, it would be equivalent to:
```scala
occurences.iterator.filter(!monitor.isCanceled).map{ ... }
```
So the check for the monitor state would be done a few times in a row, but not during the actual computation.

I think the first version was better. (also, the `.iterator` is not needed)