pairwise method

Stream<Iterable<T>> pairwise ()

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

Example

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

Implementation

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