title: Remove duplicate sequences using FoldLeft/Right
body: <p>Hi i wonder how could i remove duplicate sequences using FoldLeft. I implemented a code for lists with small changes but it returns List(3, 1, 4, 2, 1), but for seq = Seq(1, 1, 2, 4, 4, 4, 1, 3) it should return  Seq(1, 2, 4, 1, 3)</p>
  <pre><code>def deStutter[A](seq: Seq[A]): Seq[A] = {
  seq.foldLeft(Seq[A]()) {
    case (Seq(), item) =&gt; Seq(item)
    case (ls, item) if (ls.head == item)  =&gt; ls
    case (ls, item) =&gt; (item +: ls)
  }
  println(deStutter(Seq(1, 1, 2, 4, 4, 4, 1, 3)))
  </code></pre>