title: Remove first N occurrence of an element from a List
body: <p>Java 8 introduced Lambdas, which allow us to efficiently remove all elements from a List. The following removes all instances of 2 from <code>myList</code>.</p>
  <pre><code>List&lt;Integer&gt; myList;
  ...
  myList.removeIf(x -&gt; x==2);
  </code></pre>
  <p>If I wanted to remove N number of elements (in this case, three), I would use a <code>for</code> loop.</p>
  <pre><code>for (int i = 0; i &lt; 3; i++) {
      myList.remove(Integer.valueOf(2));
  }
  </code></pre>
  <p>Is there a way to remove a specified number of elements from a List using Lambdas? If so, is it more efficient than the <code>for</code> loop code?</p>