Returns a list containing only elements where the pair of it and its successor (including the enclosing pair) matches the given predicate.