Take values pairwise from this observable.
- Returns
- Observable that emits tuples of two the most recent items emitted by the source observable.
- Sample Code
values.
[](std::tuple<int, int> v){printf("OnNext: %d, %d\n", std::get<0>(v), std::get<1>(v));},
[](){printf("OnCompleted\n");});
OnNext: 1, 2
OnNext: 2, 3
OnNext: 3, 4
OnNext: 4, 5
OnCompleted
If the source observable emits less than two items, no pairs are emitted by the source observable: values.
[](std::tuple<int, int> v){printf("OnNext: %d, %d\n", std::get<0>(v), std::get<1>(v));},
[](){printf("OnCompleted\n");});