title: scala copy objects
body: <p>Is there a way to make a copy of an object (or even better a list of objects)?
  I'm talking about custom objects of classes that may be extended by other classes.</p>
  
  <p>example: </p>
  
  <pre><code>class Foo() {
     var test = "test"
  }
  
  class Bar() extends Foo {
     var dummy = new CustomClass()
  }
  
  var b = new Bar()
  var bCopy = b.copy() // or something?
  </code></pre>