Solved and Closed
The code snippet is from rx.js doc
var increaseButton = document.querySelector('#increase');
var increase = Rx.Observable.fromEvent(increaseButton, 'click')
.map(() => state => Object.assign({}, state, {count: state.count + 1}));
// We create an object with our initial state. Whenever a new state change function
// is received we call it and pass the state. The new state is returned and
// ready to be changed again on the next click
var state = increase.scan((state, changeFn) => changeFn(state), {count: 0});
我在这里感到困惑,为什么changeFn
是由map
运营商返回的正确的?{/ p>