Question: I have a list in scala that looks like the following:

```
val totalQuote: List[List[String]] = List(List("a","b","c"),List("1","2","3"),List("d","e","f"),List("4","5","6"))

```

I want to print out every element in the list using a foreach loop. However when I run this:

```
totalQuote.foreach{ e =>
      val(a,b) = e
      println(a)
    }

```

I get the following error:

```
Error:(17, 10) constructor cannot be instantiated to expected type;
 found   : (T1, T2)
 required: List[String]
      val(a,b) = e

```

Not sure how to resolve this!

Answer: 
The type of `e` is `List[String]` but

```
val (a,b) = e

```

only works if `e` is a tuple. Try this

```
val a::b::_ = e

```
You can simply use the following to print each element of the list

```
  totalQuote.flatten.foreach{x => println(x)}

```