4 ms·
The example given in the readme (API pagination) seems better suited to an observable or stream to me, but it left me curious about applicability to other use c
by emilong 10y ago
The example given in the readme (API pagination) seems better suited to an observable or stream to me, but it left me curious about applicability to other use cases with Promises.
One is retries on failure or timeout. The other is waiting for something to execute a certain number of times. The latter is something I've used only in tests, but it might have other uses I'm not thinking of. I've implemented both of these in the past with recursion, which is great, but scares some folks, esp when mixed with promises.
- chajath 10y agoI think there's some value in expressing things like retries in terms of recursions and reaching the fixed point. With regards to your first comment, I'm actually considering porting some of the logics to rxjs or other reactive extensions.