title: How to get Ponter/Reference semantics in Scala
body: <p>In C++ I would just take a pointer (or reference) to arr[idx].<br>
  In Scala I find myself creating this class to emulate a pointer semantic.</p>
  
  <pre><code>class SetTo (val arr : Array[Double], val idx : Int) {
    def apply (d : Double) { arr(idx) = d }
  }
  </code></pre>
  
  <p>Isn't there a simpler way?<br>
  Doesn't Array class have a method to return some kind of reference to a particular field?</p>