domenic / promises-unwrapping

The ES6 promises spec, as per September 2013 TC39 meeting
1.23k stars 94 forks source link

iterable should be transformed to an iterator #58

Closed Nathan-Wall closed 10 years ago

Nathan-Wall commented 10 years ago

It looks like places in the ES6 draft where a function takes an iteratable, it converts it to an iterator before passing to IteratorStep. Should similar steps be taken in Promise.all and Promise.race?

For example, see Map, step 7:

a. Let iter be the result of GetIterator(iterable).
b. ReturnIfAbrupt(iter).

Then iter is passed to IteratorStep.

domenic commented 10 years ago

Good call, thanks!