Is there a straightforward idiomatic way, maybe even existing method to accomplish this in scala:
Perform a loop/iterator checking every element in a sequence against a condition. Whenever the condition is met, skip the next N elements, then continue checking the rest until condition is met again, skip N elements and so on.
The only way I thought of is to use a mutable counter or a tail recursion. Is there a better solution?