Scan<T> extension

A utility similar to fold which emits intermediate accumulations.

on

Methods

scan<S>(S initialValue, FutureOr<S> combine(S soFar, T element)) Stream<S>
Emits a sequence of the accumulated values from repeatedly applying combine.