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

Commit

Permalink
Renamed symmetricDifference to xor
Browse files Browse the repository at this point in the history
Renamed difference to except
  • Loading branch information
Ginden committed Feb 25, 2018
1 parent 07f7e6a commit 0073e9e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!doctype html>
<head><meta charset="utf-8">
<title>New Set methods</title><script type="application/json" id="menu-search-biblio">[{"type":"clause","id":"formalities","aoid":null,"title":"Formal informations","titleHTML":"Formal informations","number":"1","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Formal informations"},{"type":"clause","id":"Set.prototype.union","aoid":null,"title":"Set.prototype.union(iterable)","titleHTML":"Set.prototype.union(<var>iterable</var>)","number":"2","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.union(iterable)"},{"type":"clause","id":"Set.prototype.intersect","aoid":null,"title":"Set.prototype.intersect(iterable)","titleHTML":"Set.prototype.intersect(<var>iterable</var>)","number":"3","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.intersect(iterable)"},{"type":"clause","id":"Set.prototype.difference","aoid":null,"title":"Set.prototype.difference(iterable)","titleHTML":"Set.prototype.difference(<var>iterable</var>)","number":"4","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.difference(iterable)"},{"type":"clause","id":"Set.prototype.symmetricDifference","aoid":null,"title":"Set.prototype.symmetricDifference(iterable)","titleHTML":"Set.prototype.symmetricDifference(<var>iterable</var>)","number":"5","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.symmetricDifference(iterable)"},{"type":"clause","id":"sec-copyright-and-software-license","aoid":null,"title":"Copyright & Software License","titleHTML":"Copyright &amp; Software License","number":"A","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Copyright & Software License"}]</script></head><body><div id="menu-toggle">☰</div><div id="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="#formalities" title="Formal informations"><span class="secnum">1</span> Formal informations</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.union" title="Set.prototype.union(iterable)"><span class="secnum">2</span> Set.prototype.union(<var>iterable</var>)</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.intersect" title="Set.prototype.intersect(iterable)"><span class="secnum">3</span> Set.prototype.intersect(<var>iterable</var>)</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.difference" title="Set.prototype.difference(iterable)"><span class="secnum">4</span> Set.prototype.difference(<var>iterable</var>)</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.symmetricDifference" title="Set.prototype.symmetricDifference(iterable)"><span class="secnum">5</span> Set.prototype.symmetricDifference(<var>iterable</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="title first">New Set methods</h1>
<title>New Set methods</title><script type="application/json" id="menu-search-biblio">[{"type":"clause","id":"formalities","aoid":null,"title":"Formal informations","titleHTML":"Formal informations","number":"1","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Formal informations"},{"type":"clause","id":"Set.prototype.union","aoid":null,"title":"Set.prototype.union(iterable)","titleHTML":"Set.prototype.union(<var>iterable</var>)","number":"2","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.union(iterable)"},{"type":"clause","id":"Set.prototype.intersect","aoid":null,"title":"Set.prototype.intersect(iterable)","titleHTML":"Set.prototype.intersect(<var>iterable</var>)","number":"3","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.intersect(iterable)"},{"type":"clause","id":"Set.prototype.difference","aoid":null,"title":"Set.prototype.except(iterable)","titleHTML":"Set.prototype.except(<var>iterable</var>)","number":"4","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.except(iterable)"},{"type":"clause","id":"Set.prototype.xor","aoid":null,"title":"Set.prototype.xor(iterable)","titleHTML":"Set.prototype.xor(<var>iterable</var>)","number":"5","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Set.prototype.xor(iterable)"},{"type":"clause","id":"sec-copyright-and-software-license","aoid":null,"title":"Copyright & Software License","titleHTML":"Copyright &amp; Software License","number":"A","namespace":"https://tc39.github.io/proposal-set-methods/","location":"","referencingIds":[],"key":"Copyright & Software License"}]</script></head><body><div id="menu-toggle">☰</div><div id="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="#formalities" title="Formal informations"><span class="secnum">1</span> Formal informations</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.union" title="Set.prototype.union(iterable)"><span class="secnum">2</span> Set.prototype.union(<var>iterable</var>)</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.intersect" title="Set.prototype.intersect(iterable)"><span class="secnum">3</span> Set.prototype.intersect(<var>iterable</var>)</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.difference" title="Set.prototype.except(iterable)"><span class="secnum">4</span> Set.prototype.except(<var>iterable</var>)</a></li><li><span class="item-toggle-none"></span><a href="#Set.prototype.xor" title="Set.prototype.xor(iterable)"><span class="secnum">5</span> Set.prototype.xor(<var>iterable</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="title first">New Set methods</h1>
<script src="ecmarkup.js" defer=""></script>
<link rel="stylesheet" href="ecmarkup.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/solarized_light.min.css">
Expand Down Expand Up @@ -36,22 +36,22 @@ <h1><span class="secnum">3</span>Set.prototype.intersect(<var>iterable</var>)</h
</emu-clause>

<emu-clause id="Set.prototype.difference">
<h1><span class="secnum">4</span>Set.prototype.difference(<var>iterable</var>)</h1>
<emu-import href="./set-prototype-difference.html"><p>When the <code>difference</code> method is called, the following steps are taken:</p>
<h1><span class="secnum">4</span>Set.prototype.except(<var>iterable</var>)</h1>
<emu-import href="./set-prototype-difference.html"><p>When the <code>except</code> method is called, the following steps are taken:</p>

<emu-alg><ol><li>Let <var>set</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_24"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>set</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>Ctr</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_25"><a href="https://tc39.github.io/ecma262/#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>set</var>, <emu-xref href="#sec-set-constructor"><a href="https://tc39.github.io/ecma262/#sec-set-constructor">%Set%</a></emu-xref>)</li><li>Let <var>newSet</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_26"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<var>Ctr</var>, <var>set</var>)</li><li>Let <var>remover</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_27"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>newSet</var>, "delete").</li><li>If <emu-xref aoid="IsCallable" id="_ref_28"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>remover</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iter</var> be <emu-xref aoid="GetIterator" id="_ref_29"><a href="https://tc39.github.io/ecma262/#sec-getiterator">GetIterator</a></emu-xref>(<var>iterable</var>).</li><li>If <var>iter</var> is undefined, throw a <emu-val>TypeError</emu-val> exception.</li><li>Repeat,<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_30"><a href="https://tc39.github.io/ecma262/#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iter</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>newSet</var>.</li><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_31"><a href="https://tc39.github.io/ecma262/#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_32"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>remover</var>, <var>newSet</var>, « <var>nextValue</var>.[[Value]] »)</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_33"><a href="https://tc39.github.io/ecma262/#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iter</var>, <var>status</var>)</li></ol></li></ol></emu-alg>

<p>The <code>length</code> property of the <code>union</code> method is <emu-val>1</emu-val>.</p>
<p>The <code>length</code> property of the <code>except</code> method is <emu-val>1</emu-val>.</p>
</emu-import>
</emu-clause>

<emu-clause id="Set.prototype.symmetricDifference">
<h1><span class="secnum">5</span>Set.prototype.symmetricDifference(<var>iterable</var>)</h1>
<emu-import href="./set-prototype-symmetric-difference.html"><p>When the <code>symmetricDifference</code> method is called, the following steps are taken:</p>
<emu-clause id="Set.prototype.xor">
<h1><span class="secnum">5</span>Set.prototype.xor(<var>iterable</var>)</h1>
<emu-import href="./set-prototype-symmetric-difference.html"><p>When the <code>xor</code> method is called, the following steps are taken:</p>

<emu-alg><ol><li>Let <var>set</var> be the <emu-val>this</emu-val> value.</li><li>If <emu-xref aoid="Type" id="_ref_34"><a href="https://tc39.github.io/ecma262/#sec-ecmascript-data-types-and-values">Type</a></emu-xref>(<var>set</var>) is not Object, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>Ctr</var> be ?&nbsp;<emu-xref aoid="SpeciesConstructor" id="_ref_35"><a href="https://tc39.github.io/ecma262/#sec-speciesconstructor">SpeciesConstructor</a></emu-xref>(<var>set</var>, <emu-xref href="#sec-set-constructor"><a href="https://tc39.github.io/ecma262/#sec-set-constructor">%Set%</a></emu-xref>)</li><li>Let <var>newSet</var> be ?&nbsp;<emu-xref aoid="Construct" id="_ref_36"><a href="https://tc39.github.io/ecma262/#sec-construct">Construct</a></emu-xref>(<var>Ctr</var>, <var>set</var>)</li><li>Let <var>remover</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_37"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>newSet</var>, "delete").</li><li>If <emu-xref aoid="IsCallable" id="_ref_38"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>remover</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>adder</var> be ?&nbsp;<emu-xref aoid="Get" id="_ref_39"><a href="https://tc39.github.io/ecma262/#sec-get-o-p">Get</a></emu-xref>(<var>newSet</var>, "add").</li><li>If <emu-xref aoid="IsCallable" id="_ref_40"><a href="https://tc39.github.io/ecma262/#sec-iscallable">IsCallable</a></emu-xref>(<var>adder</var>) is <emu-val>false</emu-val>, throw a <emu-val>TypeError</emu-val> exception.</li><li>Let <var>iter</var> be <emu-xref aoid="GetIterator" id="_ref_41"><a href="https://tc39.github.io/ecma262/#sec-getiterator">GetIterator</a></emu-xref>(<var>iterable</var>).</li><li>If <var>iter</var> is undefined, throw a <emu-val>TypeError</emu-val> exception.</li><li>Repeat,<ol><li>Let <var>next</var> be <emu-xref aoid="IteratorStep" id="_ref_42"><a href="https://tc39.github.io/ecma262/#sec-iteratorstep">IteratorStep</a></emu-xref>(<var>iter</var>).</li><li>If <var>next</var> is <emu-val>false</emu-val>, return <var>newSet</var>.</li><li>Let <var>nextValue</var> be ?&nbsp;<emu-xref aoid="IteratorValue" id="_ref_43"><a href="https://tc39.github.io/ecma262/#sec-iteratorvalue">IteratorValue</a></emu-xref>(<var>next</var>).</li><li>Let <var>removed</var> be <emu-xref aoid="Call" id="_ref_44"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>remover</var>, <var>newSet</var>, « <var>nextValue</var>.[[Value]] »).</li><li>If <var>removed</var> is an <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_45"><a href="https://tc39.github.io/ecma262/#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iter</var>, <var>removed</var>).</li><li>If <var>removed</var> is <emu-val>false</emu-val>,<ol><li>Let <var>status</var> be <emu-xref aoid="Call" id="_ref_46"><a href="https://tc39.github.io/ecma262/#sec-call">Call</a></emu-xref>(<var>adder</var>, <var>newSet</var>, « <var>nextValue</var>.[[Value]] »).</li><li>If <var>status</var> is an <emu-xref href="#sec-completion-record-specification-type"><a href="https://tc39.github.io/ecma262/#sec-completion-record-specification-type">abrupt completion</a></emu-xref>, return ?&nbsp;<emu-xref aoid="IteratorClose" id="_ref_47"><a href="https://tc39.github.io/ecma262/#sec-iteratorclose">IteratorClose</a></emu-xref>(<var>iter</var>, <var>status</var>).</li></ol></li></ol></li></ol></emu-alg>

<p>The <code>length</code> property of the <code>symmetricDifference</code> method is <emu-val>1</emu-val>.</p>
<p>The <code>length</code> property of the <code>xor</code> method is <emu-val>1</emu-val>.</p>
</emu-import>
</emu-clause><emu-annex id="sec-copyright-and-software-license">
<h1><span class="secnum">A</span>Copyright &amp; Software License</h1>
Expand Down
6 changes: 3 additions & 3 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ <h1>Set.prototype.intersect(_iterable_)</h1>
</emu-clause>

<emu-clause id="Set.prototype.difference">
<h1>Set.prototype.difference(_iterable_)</h1>
<h1>Set.prototype.except(_iterable_)</h1>
<emu-import href="./set-prototype-difference.html"></emu-import>
</emu-clause>

<emu-clause id="Set.prototype.symmetricDifference">
<h1>Set.prototype.symmetricDifference(_iterable_)</h1>
<emu-clause id="Set.prototype.xor">
<h1>Set.prototype.xor(_iterable_)</h1>
<emu-import href="./set-prototype-symmetric-difference.html"></emu-import>
</emu-clause>
4 changes: 2 additions & 2 deletions spec/set-prototype-difference.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>When the `difference` method is called, the following steps are taken:</p>
<p>When the `except` method is called, the following steps are taken:</p>

<emu-alg>
1. Let _set_ be the *this* value.
Expand All @@ -19,4 +19,4 @@

</emu-alg>

<p>The `length` property of the `union` method is *1*.</p>
<p>The `length` property of the `except` method is *1*.</p>
4 changes: 2 additions & 2 deletions spec/set-prototype-symmetric-difference.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p>When the `symmetricDifference` method is called, the following steps are taken:</p>
<p>When the `xor` method is called, the following steps are taken:</p>

<emu-alg>
1. Let _set_ be the *this* value.
Expand All @@ -22,4 +22,4 @@
1. If _status_ is an abrupt completion, return ? IteratorClose(_iter_, _status_).
</emu-alg>

<p>The `length` property of the `symmetricDifference` method is *1*.</p>
<p>The `length` property of the `xor` method is *1*.</p>

0 comments on commit 0073e9e

Please sign in to comment.