title: A way to simulate indexed access for Class in Scala
body: <p>How can I implement a Class which can ask just like Array, providing indexed setter?</p>
  
  <p>like:</p>
  
  <pre><code>val k = new MyKls(size)
  k(0) = 2  //&lt;&lt;-- I want this kind of functionality.
  </code></pre>
  
  <p>Thanks.</p>