#reduce/scan
//
// current
// value
// |
[1, 2, 3, 4, 5] //|
.reduce((total, x) => total + x, 0)
// ^ ^
// accumulator start
inputStream
.map(x => x.toUpperCase())
.onValue(x => this.setState({x}))