title: Add a number to every element in an Array[Double]
body: <p>I have the following:</p>
  
  <pre><code>var x = some array Array[Double]
  val n = 3
  </code></pre>
  
  <p>I want to add n to every element in x, how? I tried:</p>
  
  <pre><code>x.map(v =&gt; v + n)
  </code></pre>
  
  <p>But that doesnt work.</p>