title: Subtract arrays with frequency
body: <p>I'm trying to subtract an array from another array taking frequency into account, like this:</p>
  
  <pre><code>[1,2,2,2] some_code [1,2] # =&gt; [2,2]
  </code></pre>
  
  <p>What's the easiest way to accomplish this?</p>
  
  <p>Using <code>-</code> removes all occurrences of the elements in the second array:</p>
  
  <pre><code>[1,2,2,2] - [1,2] # =&gt; []
  </code></pre>