pecs
pecs copied to clipboard
QUESTION: Possible to chain list of promises sequentially sharing state
I'm trying to convert a list of Promise<State, ()> into a single promise that executes them in order and passes the state onto the next one. I don't know how many promises there will be, though, so I can't use then(). Is this possible?
I do not think this is possible right now out of the box.
It would be nice to have a chain() method that that can do exactly what you want.
I will dive into it.