Skip to content

Instantly share code, notes, and snippets.

@kriskowal
Created September 23, 2010 03:55
Show Gist options
  • Save kriskowal/593065 to your computer and use it in GitHub Desktop.
Save kriskowal/593065 to your computer and use it in GitHub Desktop.
return promises.reduce(function (accumulated, value) {
return Q.when(accumulated, function (accumulated) {
return Q.when(value, function (value) {
return accumulated + value;
});
});
})
Values:
[A,B,C,D,E,F,G]
Turns: | | | | | | |
| * | * | | *
* | | *
X | |
* |
X *
X
X
X
X
* is the resolution of a promise
X is a computation of the inner function
@aaroncalderon
Copy link

I am lost. Do not know what the use case can be applied with this Gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment