Hullo JS
Search…
|> scan
import { scan } from '@hullo/core'
1
import { scan } from '@hullo/core';
2
​
3
of([1,2,3,4]).pipe(scan((r,i) => r + i, 0)).subscribe({
4
next(v) { console.log(v) }
5
});
6
// prints:
7
// 1
8
// 3
9
// 6
10
// 10
Copied!
Last modified 2yr ago
Copy link