peek abstract method
Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.
Example
final result = GenericStream.of([1, 2, 3])
.peek((n) => print('Processing: $n'))
.map((n) => n * 2)
.toList();
Implementation
GenericStream<T> peek(void Function(T) action);