title: Scala case class type issue
body: <p>I am trying understand some Scala code I was given to debug, and why it does not work as expected. (p.s. newbe alert wrt Scala).</p>
  
  <pre><code>case class ColNmbr(colNmbr: Int)
  
  def getValidColumns(m: Matrix): List[ColNmbr] = {
      var l1 = matrix.zipWithIndex
      var l2 = l1.filter(tp =&gt; !checkCol(tp._1)).map(_._2)
      println("result:" + l2)
  
      l2
  }   
  </code></pre>
  
  <p>Matrix is just a List of Lists.</p>
  
  <p>The code is supposed to return a list of column indexes of all matrix columns that pass a validity check which returns a boolean. The data is correct as at the println, but there is a type error because l2 is a List[Int] instead of a List[ColNmbr]. I cannot change the case class, so how do I get the types to match?</p>