Skip to content

Latest commit

 

History

History
9 lines (9 loc) · 162 Bytes

sum_stream.dart.md

File metadata and controls

9 lines (9 loc) · 162 Bytes
Future<int> sumStream(Stream<int> stream) async {
    int sum = 0;
    await for (int value in stream) {
        sum += value;
    }
    return sum;
}