Now using span in exercise 2 to skip repeated elements that fail the predicate