title: Groovy language: how to get difference between two lists of pairs
body: <p>I am trying to get a difference of 1 list of pairs from another in Groovy language. Pairs are just (x,y) coordinates and they are unique.
  Below is a small example for simplicity. Note that lists can have dozens of pairs.</p>
  
  <pre><code>  def l1 = [[x:1, y:1]]
    def l2 = [[x:0, y:0]]
    println l1 - l2
  </code></pre>
  
  <p>will get [], that is an empty list but should be this: [[x:1,y:1]]</p>
  
  <p><strong>Update:</strong></p>
  
  <pre><code> for(n in l2) {
     l1 = l1 - n
   }
  </code></pre>
  
  <p>It works, but it's a black magic and is not optimized</p>