sum method

Future<int> sum()

Calculates the sum of all the emitted numbers.

Implementation

Future<int> sum() => fold(0, (acc, item) => acc + item);