title: Scala filtering tuple list
body: <p><strong>Question : How do you filter based on other items in a list?</strong></p>
  
  <p>I got a List that looks like that</p>
  
  <pre><code>List((2,2),(2,1),(3,1),....)
  </code></pre>
  
  <p>I want to keep the tupples which got the biggest second numbers when they got the same first ones</p>
  
  <p>so something like that on output</p>
  
  <pre><code>List((2,2),(3,1),...)
  </code></pre>
  
  <p>with (2,1) removed because the 1 was &lt; then 2  in (2,2)</p>
  
  <p>so i need to filter based on other objects in the List how do you do that.</p>
  
  <p><em>Efficiency is not really important since the list got at maximum 171 items</em></p>