DamonOehlman / async-comparison

Simple Coding Samples for async coding
15 stars 2 forks source link

Add a synchronous implementation #1

Closed ForbesLindesay closed 11 years ago

ForbesLindesay commented 11 years ago

I always thing having a synchronous implementation on file before starting is extremely helpful when trying to work out what the asynchronous implementation should look like.

Note the parallels with the promises implementation I submitted. We write the same code except for adding Promises.all to convert an array of promises to a promise for an array and using $.then(function (@) { instead of var @ = $

DamonOehlman commented 11 years ago

Good call - merged :)