Rx.Observable.generate(initialState, condition, iterate, resultSelector, [scheduler])
Converts an array to an observable sequence, using an optional scheduler to enumerate the array.
Arguments
initialState
(Any
): Initial state.condition
(Function
): Condition to terminate generation (upon returning false).iterate
(Function
): Iteration step function.resultSelector
(Function
): Selector function for results produced in the sequence.[scheduler=Rx.Scheduler.currentThread]
(Scheduler
): Scheduler on which to run the generator loop. If not provided, defaults to Scheduler.currentThread.
Returns
(Observable
): The generated sequence.