Skip to content

Commit

Permalink
the AC passed to CreateIteratorFromClosure should return completions
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra committed Sep 18, 2024
1 parent 0cb2376 commit fb4e134
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -46709,10 +46709,10 @@ <h1>Iterator.prototype.drop ( _limit_ )</h1>
1. If _remaining_ ≠ +∞, then
1. Set _remaining_ to _remaining_ - 1.
1. Let _next_ be ? IteratorStep(_iterated_).
1. If _next_ is ~done~, return ~unused~.
1. If _next_ is ~done~, return NormalCompletion(~unused~).
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return ~unused~.
1. If _value_ is ~done~, return NormalCompletion(~unused~).
1. Let _completion_ be Completion(Yield(_value_)).
1. IfAbruptCloseIterator(_completion_, _iterated_).
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).
Expand Down Expand Up @@ -46752,7 +46752,7 @@ <h1>Iterator.prototype.filter ( _predicate_ )</h1>
1. Let _counter_ be 0.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return ~unused~.
1. If _value_ is ~done~, return NormalCompletion(~unused~).
1. Let _selected_ be Completion(Call(_predicate_, *undefined*, « _value_, 𝔽(_counter_) »)).
1. IfAbruptCloseIterator(_selected_, _iterated_).
1. If ToBoolean(_selected_) is *true*, then
Expand Down Expand Up @@ -46796,7 +46796,7 @@ <h1>Iterator.prototype.flatMap ( _mapper_ )</h1>
1. Let _counter_ be 0.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return ~unused~.
1. If _value_ is ~done~, return NormalCompletion(~unused~).
1. Let _mapped_ be Completion(Call(_mapper_, *undefined*, « _value_, 𝔽(_counter_) »)).
1. IfAbruptCloseIterator(_mapped_, _iterated_).
1. Let _innerIterator_ be Completion(GetIteratorFlattenable(_mapped_, ~reject-primitives~)).
Expand Down Expand Up @@ -46850,7 +46850,7 @@ <h1>Iterator.prototype.map ( _mapper_ )</h1>
1. Let _counter_ be 0.
1. Repeat,
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return ~unused~.
1. If _value_ is ~done~, return NormalCompletion(~unused~).
1. Let _mapped_ be Completion(Call(_mapper_, *undefined*, « _value_, 𝔽(_counter_) »)).
1. IfAbruptCloseIterator(_mapped_, _iterated_).
1. Let _completion_ be Completion(Yield(_mapped_)).
Expand Down Expand Up @@ -46925,7 +46925,7 @@ <h1>Iterator.prototype.take ( _limit_ )</h1>
1. If _remaining_ ≠ +∞, then
1. Set _remaining_ to _remaining_ - 1.
1. Let _value_ be ? IteratorStepValue(_iterated_).
1. If _value_ is ~done~, return ~unused~.
1. If _value_ is ~done~, return NormalCompletion(~unused~).
1. Let _completion_ be Completion(Yield(_value_)).
1. IfAbruptCloseIterator(_completion_, _iterated_).
1. Let _result_ be CreateIteratorFromClosure(_closure_, *"Iterator Helper"*, %IteratorHelperPrototype%, « [[UnderlyingIterator]] »).
Expand Down

0 comments on commit fb4e134

Please sign in to comment.