- Official ReactiveX documentation: SkipWhile
Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. The element’s index is used in the logic of the predicate function.
1 - source.skip_while(lambda value: value < 10) 2 - source.skip_while(lambda value, index: value < 10 or index < 10)
- predicate – A function to test each element for a condition; the
- second parameter of the function represents the index of the source element.
Returns an observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate.