For the first items fulfilling the predicate from this observable emit them from the new observable that is returned.
More...
For the first items fulfilling the predicate from this observable emit them from the new observable that is returned.
- Template Parameters
-
Predicate | the type of the predicate |
- Parameters
-
- Returns
- An observable that emits only the first items emitted by the source Observable fulfilling the predicate, or all of the items from the source observable if the predicate never returns false
- Sample Code
return v <= 4;
});
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnCompleted