I posted this over on GitHub as a documentation issue, but realized it was probably more appropriate here.
I have an array of promisey functions, and I want to call them one after the other. What's a nice, concise way to do this?
The old README [1], under "Serial Join", had some nice examples using `Array.prototype.reduce` and `Q.wait`. But `Q.wait` is dead, not that I knew what it really did in the first place.
So far the best I have is
var array = [fooAsync, barAsync];
return array.reduce(function (soFar, thisFuncAsync) {
return soFar.then(thisFuncAsync);
}, Q.resolve());
But it feels weird having to pass in the "extra" `Q.resolve()`.
Any ideas, or is this the right way to go?
[1]
https://github.com/kriskowal/q/blob/badb384c057a7a9e0441c03cfdf11d1264b2f0d0/README.md