title: Remove set of values in an existing Set
body: <p>In JavaScript, I have the following <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set" rel="noreferrer">Set</a>s:</p>
  
  <pre><code>var mySet = new Set(["foo", "bar", "baz"]);
  var valuesToRemove = new Set(["foo", "baz"]);
  </code></pre>
  
  <p>I need a function that removes a set of values:</p>
  
  <pre><code>removeAll(mySet, valuesToRemove);
  // expected value of mySet: Set ["bar"]
  
  // or a function that returns a new Set
  var myNewSet = removeAll(mySet, valuesToRemove);
  // expected value of myNewSet: Set ["bar"]
  </code></pre>
  
  <p><strong>Question:</strong> Does any <a href="http://exploringjs.com/es6/ch_modules.html" rel="noreferrer">ES6-modules</a>-compatible library exists that does the trick?</p>
  
  <p><a href="https://lodash.com/" rel="noreferrer">Lodash</a> has a <a href="https://lodash.com/docs/4.16.2#pullAll" rel="noreferrer">similar function</a> for <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array" rel="noreferrer">Array</a>s, but supporting JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#Builtin_iterables" rel="noreferrer">builtin iterable</a> is <a href="https://github.com/lodash/lodash/issues/737" rel="noreferrer">tagged as <code>wontfix</code></a>. And I prefer to avoid doing multiple Array↔Set/Set↔Array conversions.</p>
  
  <p>Alternatively, I will write my own function.</p>