What will be the equivalent of
return Rx.Observable.merge([deleteTodo$, addTodo$, completeTodo$]).startWith([])
.scan(function (currentTodos, modifier) { return modifier(currentTodos); });
the above in rxjs
in xstream
?
What will be the equivalent of
return Rx.Observable.merge([deleteTodo$, addTodo$, completeTodo$]).startWith([])
.scan(function (currentTodos, modifier) { return modifier(currentTodos); });
the above in rxjs
in xstream
?
Should be like this. Initial value included as second argument after a function.
xs.merge(deleteTodo$, addTodo$, completeTodo$)
.fold(function (currentTodos, modifier) { return modifier(currentTodos); }, [])