pairwise() will remember the last emit value.
const src = interval(1000) .pipe( pairwise(), scan((acc, [prev, curr]) => { console.log(prev, curr) return acc + curr; }, 0) ).subscribe() // 0 1
pairwise() will remember the last emit value.
const src = interval(1000) .pipe( pairwise(), scan((acc, [prev, curr]) => { console.log(prev, curr) return acc + curr; }, 0) ).subscribe() // 0 1