title: Matching arrays in Scala
body: <p>In this example code I need to print each <code>Seq</code>, problem is that when I match it I only have one variable <code>x</code> instead of an array. How to get the array? Moreover, this code only prints <code>do nothing</code> twice.</p>
  
  <pre><code>   var seq = Seq(Seq(1,2,3),Seq(4,5,6))
     seq.foreach { seq2 =&gt;
       seq2 match {
         case Seq(x) =&gt; println(x)
         case _ =&gt; println("do nothing")
       }
     }
  </code></pre>