How would you handle the state reducer with this change?
Benoît Quenaudon

Well, you can call doOnNext on subject, and you have access to current value of BehaviorSubject (getValue). Also, you can create BehaviorSubject with initial value passed to its constructor.

With this in mind, you can basically do the same things that scan does.

I mean scan is just a fancy functional operator that does ultra simple thing. In this particular case, your code will be much more readable and simple without it.