function RxReduxStore(initial_state, reducers) {
let streams = {}, actions = {}, store$
for (let action in reducers) {
let subject$ = new Rx.Subject()
streams[`${action}$`] = subject$.pipe(Rx.operators.map(reducers[action]))
actions[action] = (args) => subject$.next(args)
}
store$ = new Rx.BehaviorSubject(initial_state)
.pipe(
Rx.operators.merge(...Object.values(streams)),
Rx.operators.scan((state, reducer) => reducer(state))
)
return {store$, actions}
}