title: Removing characters from List of Strings
body: <p>To remove characters from a List of Strings I use : </p>
  
  <pre><code>val validLines : List[String] = List("test[" , "test]")
  
      val charsToClean: List[String] = List("\"", "[", "]", "'")
  
      val filtered = validLines.map(line =&gt; line.replace(charsToClean(0), "")
        .replace(charsToClean(1), "")
        .replace(charsToClean(2), "")
        .replace(charsToClean(3), ""))
  </code></pre>
  
  <p>I'm attempting use a inner map function instead of hard coding the positions of the chars to replace : </p>
  
  <pre><code>val filtered1 : List[String] = validLines.map(line =&gt; charsToClean.map {c =&gt; line.replace(c , "")  })
  </code></pre>
  
  <p>But receive compiler error : </p>
  
  <pre><code>mismatch; found : List[List[String]] required: List[String]
  </code></pre>
  
  <p>Should result of <code>line.replace(c , "")</code> not be returned ?</p>