Skip to content

Commit a7d0b74

Browse files
Deploying to gh-pages from @ 025c78e 🚀
1 parent 0e79a3a commit a7d0b74

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@
4646
</ul></div><div id="menu-toggle"><svg xmlns="http://www.w3.org/2000/svg" style="width:100%; height:100%; stroke:currentColor" viewBox="0 0 120 120" width="54" height="54">
4747
<title>Menu</title>
4848
<path stroke-width="10" stroke-linecap="round" d="M30,60 h60 M30,30 m0,5 h60 M30,90 m0,-5 h60"></path>
49-
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-iterator.concat" title="Iterator.concat ( ...items )"><span class="secnum">1</span> Iterator.concat ( ...<var>items</var> )</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2.7 Draft / May 13, 2025</h1><h1 class="title">Iterator Sequencing</h1>
49+
</svg></div><div id="menu-spacer" class="menu-spacer"></div><div id="menu"><div id="menu-search"><input type="text" id="menu-search-box" placeholder="Search..."><div id="menu-search-results" class="inactive"></div></div><div id="menu-pins"><div class="menu-pane-header">Pins<button class="unpin-all">clear</button></div><ul id="menu-pins-list"></ul></div><div class="menu-pane-header">Table of Contents</div><div id="menu-toc"><ol class="toc"><li><span class="item-toggle-none"></span><a href="#sec-iterator.concat" title="Iterator.concat ( ...items )"><span class="secnum">1</span> Iterator.concat ( ...<var>items</var> )</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2.7 Draft / June 20, 2025</h1><h1 class="title">Iterator Sequencing</h1>
5050
5151
<emu-clause id="sec-iterator.concat">
5252
<h1><span class="secnum">1</span> Iterator.concat ( ...<var>items</var> )</h1>
53-
<emu-alg><ol><li>Let <var>iterables</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>item</var> of <var>items</var>, do<ol><li>If <var>item</var> <emu-xref href="#sec-object-type"><a href="https://tc39.es/ecma262/#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>method</var> be ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod" class="e-user-code">GetMethod</a></emu-xref>(<var>item</var>, <emu-xref href="#sec-well-known-symbols"><a href="https://tc39.es/ecma262/#sec-well-known-symbols">%Symbol.iterator%</a></emu-xref>).</li><li>If <var>method</var> is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Append the <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[OpenMethod]]</var>: <var>method</var>, <var class="field">[[Iterable]]</var>: <var>item</var>&nbsp;} to <var>iterables</var>.</li></ol></li><li>Let <var>closure</var> be a new <emu-xref href="#sec-abstract-closure"><a href="https://tc39.es/ecma262/#sec-abstract-closure">Abstract Closure</a></emu-xref> with no parameters that captures <var>iterables</var> and performs the following steps when called:<ol><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> <var>iterable</var> of <var>iterables</var>, do<ol><li>Let <var>iter</var> be ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call" class="e-user-code">Call</a></emu-xref>(<var>iterable</var>.<var class="field">[[OpenMethod]]</var>, <var>iterable</var>.<var class="field">[[Iterable]]</var>).</li><li>If <var>iter</var> <emu-xref href="#sec-object-type"><a href="https://tc39.es/ecma262/#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIteratorDirect"><a href="https://tc39.es/proposal-iterator-helpers#sec-getiteratordirect" class="e-user-code">GetIteratorDirect</a></emu-xref>(<var>iter</var>).</li><li>Let <var>innerAlive</var> be <emu-val>true</emu-val>.</li><li>Repeat, while <var>innerAlive</var> is <emu-val>true</emu-val>,<ol><li>Let <var>iteratorResult</var> be ?&nbsp;<emu-xref aoid="IteratorNext"><a href="https://tc39.es/ecma262/#sec-iteratornext" class="e-user-code">IteratorNext</a></emu-xref>(<var>iteratorRecord</var>).</li><li>Let <var>done</var> be <emu-xref aoid="Completion"><a href="https://tc39.es/ecma262/#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="IteratorComplete"><a href="https://tc39.es/ecma262/#sec-iteratorcomplete" class="e-user-code">IteratorComplete</a></emu-xref>(<var>iteratorResult</var>)).</li><li>If <var>done</var> is a <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.es/ecma262/#sec-completion-record-specification-type">throw completion</a></emu-xref>, then<ol><li>Set <var>iteratorRecord</var>.<var class="field">[[Done]]</var> to <emu-val>true</emu-val>.</li><li>Return ?&nbsp;<var>done</var>.</li></ol></li><li>Set <var>done</var> to !&nbsp;<var>done</var>.</li><li>If <var>done</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>iteratorRecord</var>.<var class="field">[[Done]]</var> to <emu-val>true</emu-val>.</li><li>Perform ?&nbsp;<emu-xref aoid="IteratorValue"><a href="https://tc39.es/ecma262/#sec-iteratorvalue" class="e-user-code">IteratorValue</a></emu-xref>(<var>iteratorResult</var>).</li><li>Set <var>innerAlive</var> to <emu-val>false</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>completion</var> be <emu-xref aoid="Completion"><a href="https://tc39.es/ecma262/#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="GeneratorYield"><a href="https://tc39.es/ecma262/#sec-generatoryield">GeneratorYield</a></emu-xref>(<var>iteratorResult</var>)).</li><li>If <var>completion</var> is an <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.es/ecma262/#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Return ?&nbsp;<emu-xref aoid="IteratorClose"><a href="https://tc39.es/ecma262/#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>completion</var>).</li></ol></li></ol></li></ol></li></ol></li><li>Return <emu-xref aoid="ReturnCompletion"><a href="https://tc39.es/ecma262/#sec-returncompletion">ReturnCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Let <var>gen</var> be <emu-xref aoid="CreateIteratorFromClosure"><a href="https://tc39.es/proposal-iterator-helpers#sec-createiteratorfromclosure">CreateIteratorFromClosure</a></emu-xref>(<var>closure</var>, <emu-val>"Iterator Helper"</emu-val>, <emu-xref href="#sec-%iteratorhelperprototype%-object"><a href="https://tc39.es/proposal-iterator-helpers#sec-%iteratorhelperprototype%-object">%IteratorHelperPrototype%</a></emu-xref>, « <var class="field">[[UnderlyingIterators]]</var>&nbsp;»).</li><li>Set <var>gen</var>.<var class="field">[[UnderlyingIterators]]</var> to a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <var>gen</var>.</li></ol></emu-alg>
53+
<emu-alg><ol><li>Let <var>iterables</var> be a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>For each element <var>item</var> of <var>items</var>, do<ol><li>If <var>item</var> <emu-xref href="#sec-object-type"><a href="https://tc39.es/ecma262/#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>method</var> be ?&nbsp;<emu-xref aoid="GetMethod"><a href="https://tc39.es/ecma262/#sec-getmethod" class="e-user-code">GetMethod</a></emu-xref>(<var>item</var>, <emu-xref href="#sec-well-known-symbols"><a href="https://tc39.es/ecma262/#sec-well-known-symbols">%Symbol.iterator%</a></emu-xref>).</li><li>If <var>method</var> is <emu-val>undefined</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Append the <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> { <var class="field">[[OpenMethod]]</var>: <var>method</var>, <var class="field">[[Iterable]]</var>: <var>item</var>&nbsp;} to <var>iterables</var>.</li></ol></li><li>Let <var>closure</var> be a new <emu-xref href="#sec-abstract-closure"><a href="https://tc39.es/ecma262/#sec-abstract-closure">Abstract Closure</a></emu-xref> with no parameters that captures <var>iterables</var> and performs the following steps when called:<ol><li>For each <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">Record</a></emu-xref> <var>iterable</var> of <var>iterables</var>, do<ol><li>Let <var>iter</var> be ?&nbsp;<emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call" class="e-user-code">Call</a></emu-xref>(<var>iterable</var>.<var class="field">[[OpenMethod]]</var>, <var>iterable</var>.<var class="field">[[Iterable]]</var>).</li><li>If <var>iter</var> <emu-xref href="#sec-object-type"><a href="https://tc39.es/ecma262/#sec-object-type">is not an Object</a></emu-xref>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iteratorRecord</var> be ?&nbsp;<emu-xref aoid="GetIteratorDirect"><a href="https://tc39.es/proposal-iterator-helpers#sec-getiteratordirect" class="e-user-code">GetIteratorDirect</a></emu-xref>(<var>iter</var>).</li><li>Let <var>innerAlive</var> be <emu-val>true</emu-val>.</li><li>Repeat, while <var>innerAlive</var> is <emu-val>true</emu-val>,<ol><li>Let <var>innerValue</var> be ?&nbsp;<emu-xref aoid="IteratorStepValue"><a href="https://tc39.es/ecma262/#sec-iteratorstepvalue" class="e-user-code">IteratorStepValue</a></emu-xref>(<var>iteratorRecord</var>).</li><li>If <var>innerValue</var> is <emu-const>done</emu-const>, then<ol><li>Set <var>innerAlive</var> to <emu-val>false</emu-val>.</li></ol></li><li>Else,<ol><li>Let <var>completion</var> be <emu-xref aoid="Completion"><a href="https://tc39.es/ecma262/#sec-completion-ao">Completion</a></emu-xref>(<emu-xref aoid="Yield"><a href="https://tc39.es/ecma262/#sec-yield" class="e-user-code">Yield</a></emu-xref>(<var>innerValue</var>)).</li><li>If <var>completion</var> is an <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.es/ecma262/#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, then<ol><li>Return ?&nbsp;<emu-xref aoid="IteratorClose"><a href="https://tc39.es/ecma262/#sec-iteratorclose" class="e-user-code">IteratorClose</a></emu-xref>(<var>iteratorRecord</var>, <var>completion</var>).</li></ol></li></ol></li></ol></li></ol></li><li>Return <emu-xref aoid="ReturnCompletion"><a href="https://tc39.es/ecma262/#sec-returncompletion">ReturnCompletion</a></emu-xref>(<emu-val>undefined</emu-val>).</li></ol></li><li>Let <var>gen</var> be <emu-xref aoid="CreateIteratorFromClosure"><a href="https://tc39.es/proposal-iterator-helpers#sec-createiteratorfromclosure">CreateIteratorFromClosure</a></emu-xref>(<var>closure</var>, <emu-val>"Iterator Helper"</emu-val>, <emu-xref href="#sec-%iteratorhelperprototype%-object"><a href="https://tc39.es/proposal-iterator-helpers#sec-%iteratorhelperprototype%-object">%IteratorHelperPrototype%</a></emu-xref>, « <var class="field">[[UnderlyingIterators]]</var>&nbsp;»).</li><li>Set <var>gen</var>.<var class="field">[[UnderlyingIterators]]</var> to a new empty <emu-xref href="#sec-list-and-record-specification-type"><a href="https://tc39.es/ecma262/#sec-list-and-record-specification-type">List</a></emu-xref>.</li><li>Return <var>gen</var>.</li></ol></emu-alg>
5454
</emu-clause>
5555
</div></body>

0 commit comments

Comments
 (0)