title: Non negative set subtraction
body: <p>This applies to any language, but I'd be implementing it in node.</p>
  
  <p>I have a set of integers, and a value that I need to subtract from the sum of the set.</p>
  
  <pre><code>[4, 5, 6, 7, 8] - 25
  </code></pre>
  
  <p>If we subtract from every number evenly, we'd get:</p>
  
  <pre><code>[-1, 0, 1, 2, 3]
  </code></pre>
  
  <p>However, I don't want any numbers less than 0. So, if I were writing an algorithm to do this, the negative numbers would overflow equally into the remaining numbers, and we'd now have:</p>
  
  <pre><code>[0, 0, 1, 2, 3] - 1
  </code></pre>
  
  <p>Making the resulting set:</p>
  
  <pre><code>[0, 0, 1 - 0.333, 2 - 0.333, 3 - 0.333]
  </code></pre>
  
  <p>Is there any fast operation or series of operations that don't involve looping until completion to solve this problem?</p>
  
  <p>Note that this is exactly the outcome I want. All of the negative values overflow EVENLY into the remaining positive values.</p>
  
  <p>I use Lodash so an answer in Lodash would be acceptable.</p>