pairwise method

Observable<Iterable<T>> pairwise ()

Emits the n-th and n-1th events as a pair..

Example

Observable.range(1, 4)
  .pairwise()
  .listen(print); // prints [1, 2], [2, 3], [3, 4]

Implementation

Observable<Iterable<T>> pairwise() => transform(PairwiseStreamTransformer());