title: Unable to updating an array inside list's map function. Scala Programming
body: <p>I am trying to update an <code>Array[Array[String]]</code> type when a map function is called on list.</p>
  
  <pre><code>var m : Array[Array[String]] = Array(Array(""))
  var n : List((String, Double))
  n contains 100 elements
  i want to update m foreach element in n like
  n.map(x =&gt; {
     m :+ Array("a","b","c");
     x
  })
  </code></pre>
  
  <p>but I am ending up with empty array. Values are not appending to m.
  I want to try it for an <code>RDD</code> as well.</p>