Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
Deploying to gh-pages from @ a52031f 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Dec 3, 2023
1 parent 73ecae6 commit 3db9329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</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">
<title>Menu</title>
<path stroke-width="10" stroke-linecap="round" d="M30,60 h60 M30,30 m0,5 h60 M30,90 m0,-5 h60"></path>
</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</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-set.prototype.union" title="Set.prototype.union ( other )"><span class="secnum">1</span> Set.prototype.union ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.intersection" title="Set.prototype.intersection ( other )"><span class="secnum">2</span> Set.prototype.intersection ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.difference" title="Set.prototype.difference ( other )"><span class="secnum">3</span> Set.prototype.difference ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.symmetricdifference" title="Set.prototype.symmetricDifference ( other )"><span class="secnum">4</span> Set.prototype.symmetricDifference ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.issubsetof" title="Set.prototype.isSubsetOf ( other )"><span class="secnum">5</span> Set.prototype.isSubsetOf ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.issupersetof" title="Set.prototype.isSupersetOf ( other )"><span class="secnum">6</span> Set.prototype.isSupersetOf ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.isdisjointfrom" title="Set.prototype.isDisjointFrom ( other )"><span class="secnum">7</span> Set.prototype.isDisjointFrom ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set-records" title="Set Records"><span class="secnum">8</span> Set Records</a></li><li><span class="item-toggle-none"></span><a href="#sec-getsetrecord" title="GetSetRecord ( obj )"><span class="secnum">9</span> GetSetRecord ( <var>obj</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setdatahas" title="SetDataHas ( resultSetData, value )"><span class="secnum">10</span> SetDataHas ( <var>resultSetData</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2 Draft / November 25, 2023</h1><h1 class="title">Set methods</h1>
</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</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-set.prototype.union" title="Set.prototype.union ( other )"><span class="secnum">1</span> Set.prototype.union ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.intersection" title="Set.prototype.intersection ( other )"><span class="secnum">2</span> Set.prototype.intersection ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.difference" title="Set.prototype.difference ( other )"><span class="secnum">3</span> Set.prototype.difference ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.symmetricdifference" title="Set.prototype.symmetricDifference ( other )"><span class="secnum">4</span> Set.prototype.symmetricDifference ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.issubsetof" title="Set.prototype.isSubsetOf ( other )"><span class="secnum">5</span> Set.prototype.isSubsetOf ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.issupersetof" title="Set.prototype.isSupersetOf ( other )"><span class="secnum">6</span> Set.prototype.isSupersetOf ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set.prototype.isdisjointfrom" title="Set.prototype.isDisjointFrom ( other )"><span class="secnum">7</span> Set.prototype.isDisjointFrom ( <var>other</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-set-records" title="Set Records"><span class="secnum">8</span> Set Records</a></li><li><span class="item-toggle-none"></span><a href="#sec-getsetrecord" title="GetSetRecord ( obj )"><span class="secnum">9</span> GetSetRecord ( <var>obj</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-setdatahas" title="SetDataHas ( resultSetData, value )"><span class="secnum">10</span> SetDataHas ( <var>resultSetData</var>, <var>value</var> )</a></li><li><span class="item-toggle-none"></span><a href="#sec-copyright-and-software-license" title="Copyright &amp; Software License"><span class="secnum">A</span> Copyright &amp; Software License</a></li></ol></div></div><div id="spec-container"><h1 class="version">Stage 2 Draft / December 3, 2023</h1><h1 class="title">Set methods</h1>

<emu-clause id="sec-set.prototype.union">
<h1><span class="secnum">1</span> Set.prototype.union ( <var>other</var> )</h1>
Expand All @@ -26,7 +26,7 @@ <h1><span class="secnum">2</span> Set.prototype.intersection ( <var>other</var>
<emu-clause id="sec-set.prototype.difference">
<h1><span class="secnum">3</span> Set.prototype.difference ( <var>other</var> )</h1>
<p>This method performs the following steps when called:</p>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="RequireInternalSlot"><a href="https://tc39.es/ecma262/#sec-requireinternalslot">RequireInternalSlot</a></emu-xref>(<var>O</var>, <var class="field">[[SetData]]</var>).</li><li>Let <var>otherRec</var> be ?&nbsp;<emu-xref aoid="GetSetRecord" id="_ref_7"><a href="#sec-getsetrecord" class="e-user-code">GetSetRecord</a></emu-xref>(<var>other</var>).</li><li>Let <var>resultSetData</var> be a copy of <var>O</var>.<var class="field">[[SetData]]</var>.</li><li>Let <var>thisSize</var> be the number of elements in <var>O</var>.<var class="field">[[SetData]]</var>.</li><li>If <var>thisSize</var> ≤ <var>otherRec</var>.<var class="field">[[Size]]</var>, then<ol><li>Let <var>index</var> be 0.</li><li>Repeat, while <var>index</var> &lt; <var>thisSize</var>,<ol><li>Let <var>e</var> be <var>resultSetData</var>[<var>index</var>].</li><li>Set <var>index</var> to <var>index</var> + 1.</li><li>If <var>e</var> is not <emu-const>empty</emu-const>, then<ol><li>Let <var>inOther</var> be <emu-xref aoid="ToBoolean"><a href="https://tc39.es/ecma262/#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call" class="e-user-code">Call</a></emu-xref>(<var>otherRec</var>.<var class="field">[[Has]]</var>, <var>otherRec</var>.<var class="field">[[Set]]</var>, « <var>e</var>&nbsp;»)).</li><li>If <var>inOther</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>resultSetData</var>[<var>index</var>] to <emu-const>empty</emu-const>.</li></ol></li></ol></li></ol></li></ol></li><li>Else,<ol><li>Let <var>keysIter</var> be ?&nbsp;<emu-xref aoid="GetIteratorFromMethod"><a href="https://tc39.es/ecma262/#sec-getiteratorfrommethod" class="e-user-code">GetIteratorFromMethod</a></emu-xref>(<var>otherRec</var>.<var class="field">[[Set]]</var>, <var>otherRec</var>.<var class="field">[[Keys]]</var>).</li><li>Let <var>next</var> be <emu-val>true</emu-val>.</li><li>Repeat, while <var>next</var> is not <emu-val>false</emu-val>,<ol><li>Set <var>next</var> to ?&nbsp;<emu-xref aoid="IteratorStep"><a href="https://tc39.es/ecma262/#sec-iteratorstep" class="e-user-code">IteratorStep</a></emu-xref>(<var>keysIter</var>).</li><li>If <var>next</var> is not <emu-val>false</emu-val>, then<ol><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue"><a href="https://tc39.es/ecma262/#sec-iteratorvalue" class="e-user-code">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>nextValue</var> is <emu-val>-0</emu-val><sub>𝔽</sub>, set <var>nextValue</var> to <emu-val>+0</emu-val><sub>𝔽</sub>.</li><li>If <emu-xref aoid="SetDataHas" id="_ref_8"><a href="#sec-setdatahas">SetDataHas</a></emu-xref>(<var>resultSetData</var>, <var>nextValue</var>) is <emu-val>true</emu-val>, then<ol><li>Remove <var>nextValue</var> from <var>resultSetData</var>.</li></ol></li></ol></li></ol></li></ol></li><li>Let <var>result</var> be <emu-xref aoid="OrdinaryObjectCreate"><a href="https://tc39.es/ecma262/#sec-ordinaryobjectcreate">OrdinaryObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-set-prototype-object"><a href="https://tc39.es/ecma262/#sec-properties-of-the-set-prototype-object">%Set.prototype%</a></emu-xref>, « <var class="field">[[SetData]]</var>&nbsp;»).</li><li>Set <var>result</var>.<var class="field">[[SetData]]</var> to <var>resultSetData</var>.</li><li>Return <var>result</var>.</li></ol></emu-alg>
<emu-alg><ol><li>Let <var>O</var> be the <emu-val>this</emu-val> value.</li><li>Perform ?&nbsp;<emu-xref aoid="RequireInternalSlot"><a href="https://tc39.es/ecma262/#sec-requireinternalslot">RequireInternalSlot</a></emu-xref>(<var>O</var>, <var class="field">[[SetData]]</var>).</li><li>Let <var>otherRec</var> be ?&nbsp;<emu-xref aoid="GetSetRecord" id="_ref_7"><a href="#sec-getsetrecord" class="e-user-code">GetSetRecord</a></emu-xref>(<var>other</var>).</li><li>Let <var>resultSetData</var> be a copy of <var>O</var>.<var class="field">[[SetData]]</var>.</li><li>Let <var>thisSize</var> be the number of elements in <var>O</var>.<var class="field">[[SetData]]</var>.</li><li>If <var>thisSize</var> ≤ <var>otherRec</var>.<var class="field">[[Size]]</var>, then<ol><li>Let <var>index</var> be 0.</li><li>Repeat, while <var>index</var> &lt; <var>thisSize</var>,<ol><li>Let <var>e</var> be <var>resultSetData</var>[<var>index</var>].</li><li>If <var>e</var> is not <emu-const>empty</emu-const>, then<ol><li>Let <var>inOther</var> be <emu-xref aoid="ToBoolean"><a href="https://tc39.es/ecma262/#sec-toboolean">ToBoolean</a></emu-xref>(? <emu-xref aoid="Call"><a href="https://tc39.es/ecma262/#sec-call" class="e-user-code">Call</a></emu-xref>(<var>otherRec</var>.<var class="field">[[Has]]</var>, <var>otherRec</var>.<var class="field">[[Set]]</var>, « <var>e</var>&nbsp;»)).</li><li>If <var>inOther</var> is <emu-val>true</emu-val>, then<ol><li>Set <var>resultSetData</var>[<var>index</var>] to <emu-const>empty</emu-const>.</li></ol></li></ol></li><li>Set <var>index</var> to <var>index</var> + 1.</li></ol></li></ol></li><li>Else,<ol><li>Let <var>keysIter</var> be ?&nbsp;<emu-xref aoid="GetIteratorFromMethod"><a href="https://tc39.es/ecma262/#sec-getiteratorfrommethod" class="e-user-code">GetIteratorFromMethod</a></emu-xref>(<var>otherRec</var>.<var class="field">[[Set]]</var>, <var>otherRec</var>.<var class="field">[[Keys]]</var>).</li><li>Let <var>next</var> be <emu-val>true</emu-val>.</li><li>Repeat, while <var>next</var> is not <emu-val>false</emu-val>,<ol><li>Set <var>next</var> to ?&nbsp;<emu-xref aoid="IteratorStep"><a href="https://tc39.es/ecma262/#sec-iteratorstep" class="e-user-code">IteratorStep</a></emu-xref>(<var>keysIter</var>).</li><li>If <var>next</var> is not <emu-val>false</emu-val>, then<ol><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue"><a href="https://tc39.es/ecma262/#sec-iteratorvalue" class="e-user-code">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>If <var>nextValue</var> is <emu-val>-0</emu-val><sub>𝔽</sub>, set <var>nextValue</var> to <emu-val>+0</emu-val><sub>𝔽</sub>.</li><li>If <emu-xref aoid="SetDataHas" id="_ref_8"><a href="#sec-setdatahas">SetDataHas</a></emu-xref>(<var>resultSetData</var>, <var>nextValue</var>) is <emu-val>true</emu-val>, then<ol><li>Remove <var>nextValue</var> from <var>resultSetData</var>.</li></ol></li></ol></li></ol></li></ol></li><li>Let <var>result</var> be <emu-xref aoid="OrdinaryObjectCreate"><a href="https://tc39.es/ecma262/#sec-ordinaryobjectcreate">OrdinaryObjectCreate</a></emu-xref>(<emu-xref href="#sec-properties-of-the-set-prototype-object"><a href="https://tc39.es/ecma262/#sec-properties-of-the-set-prototype-object">%Set.prototype%</a></emu-xref>, « <var class="field">[[SetData]]</var>&nbsp;»).</li><li>Set <var>result</var>.<var class="field">[[SetData]]</var> to <var>resultSetData</var>.</li><li>Return <var>result</var>.</li></ol></emu-alg>
</emu-clause>

<emu-clause id="sec-set.prototype.symmetricdifference">
Expand Down

0 comments on commit 3db9329

Please sign in to comment.