title: Scala error: '=' expected but ';' found
body: <p>Not sure what caused this problem: error: '=' expected but ';' found.</p>
  
  <pre><code>val vectors = filtered_data_by_key.map( x =&gt; {
      var temp
      x._2.copyToArray(temp)  // Error occurs here
      (x._1, temp)
  })
  </code></pre>