<div dir="ltr"><div dir="ltr">Are you perhaps looking for <a href="https://github.com/tc39/proposal-set-methods">https://github.com/tc39/proposal-set-methods</a> ?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2019 at 1:18 PM Oğuz Kılıç <<a href="mailto:oguzz.kilic@gmail.com">oguzz.kilic@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Yes, I already consider it as an enriched version of the current set method, I just like calling it superset :)<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 9, 2019 at 11:05 PM Григорий Карелин <<a href="mailto:grundiss@gmail.com" target="_blank">grundiss@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div dir="auto">Maybe add those methods into Set instead of creating new type?</div></div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 9 Jul 2019 at 23:02, Oğuz Kılıç <<a href="mailto:oguzz.kilic@gmail.com" target="_blank">oguzz.kilic@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail-m_-2534480050071096594gmail-m_6071992874109283619m_1064584362245722047markdown-here-wrapper"><p style="margin:0px 0px 1.2em">As you know, the current Set feature is not sufficient in some aspects. We benefit from utility libraries or special implementations to fill this deficiency. </p>
<p style="margin:0px 0px 1.2em">For example, wouldn’t it be better if we had the following approach?</p>
<p style="margin:0px 0px 1.2em">UNION</p>
<pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block">X ∪ Y = { x | x ∈ X or x ∈ Y }
</code></pre><pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block">let first = new SuperSet(["a", "b", "c"]);
let second = new SuperSet(["b", "c", "d", "e"]);

first.union(second); //→ SuperSet { "a", "b", "c", "d", "e" }
</code></pre><p style="margin:0px 0px 1.2em">DIFFERENCE</p>
<pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block">X - Y = { x | x ∈ X and x ∉ Y }
</code></pre><pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block">let nums = new SuperSet([3, 4, 5, 6]);
let primes = new SuperSet([2, 3, 5, 7]);

nums.diff(primes); // → SuperSet { 4, 6 }
</code></pre><p style="margin:0px 0px 1.2em">INTERSECT</p>
<pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block">X ∩ Y = { x | x ∈ X and x ∈ Y }
</code></pre><pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block">let nums = new SuperSet([3, 4, 5, 6]);
let primes = new SuperSet([2, 3, 5, 7]);
nums.intersect(primes); // → SuperSet { 3, 5 }
</code></pre><p style="margin:0px 0px 1.2em">DISCARD</p>
<pre style="font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;background-color:rgb(248,248,248);white-space:pre-wrap;overflow:auto;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block">let nums = new SuperSet([1, 2, 3, 4]);
nums.discard([1, 3]); // → SuperSet { 2, 4 }
</code></pre><p style="margin:0px 0px 1.2em">Motivation<br>SuperSet - <a href="https://github.com/BYK/superset" target="_blank">https://github.com/BYK/superset</a></p>
<div title="MDH:QXMgeW91IGtub3csIHRoZSBjdXJyZW50IFNldCBmZWF0dXJlI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uayI+aHR0cHM6Ly9naXRodWIuY29tL0JZSy88d2JyPnN1cGVyc2V0PC9h
PjwvZGl2Pg==" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px"></div></div></div>
_______________________________________________<br>
es-discuss mailing list<br>
<a href="mailto:es-discuss@mozilla.org" target="_blank">es-discuss@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/es-discuss" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/es-discuss</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail-m_-2534480050071096594gmail-m_6071992874109283619gmail_signature">Отправлено с мобильного устройства</div>
</blockquote></div>
_______________________________________________<br>
es-discuss mailing list<br>
<a href="mailto:es-discuss@mozilla.org" target="_blank">es-discuss@mozilla.org</a><br>
<a href="https://mail.mozilla.org/listinfo/es-discuss" rel="noreferrer" target="_blank">https://mail.mozilla.org/listinfo/es-discuss</a><br>
</blockquote></div>