title: Scala: Sequence difference
body: <p>What would be the best way to find difference (complement) D of two sequences A and B, where D = A - B is the sequence of all objects that belong to A but not to B. For example with:</p>
  
  <pre><code>val A = Seq((1,1), (2,1), (3,1), (4,1), (5,1))
  val B = Seq((1,1), (5,1))
  </code></pre>
  
  <p>to get:</p>
  
  <pre><code>val D = Seq((2,1), (3,1), (4,1))
  </code></pre>
  
  <p>Filtering of A and its subsets with B elements does not seem to be an effective solution for 'long' sequences.Any other ideas?</p>