code: function all(iterable){
        var C      = getConstructor(this)
          , values = [];
        return new C(function(res, rej){
          forOf(iterable, false, values.push, values);
          var remaining = values.length
            , results   = Array(remaining);
          if(remaining)$.each.call(values, function(promise, index){
            C.resolve(promise).then(function(value){
              results[index] = value;
              --remaining || res(results);
            }, rej);
          });
          else res(results);
        });
      }
docs: 25.4.4.1 Promise.all(iterable)