title: Groovy List Parameter issues : += does not work but .add() does
body: <pre><code>public updateList(lst) {
    lst += "a"
  }
  
  List lst = []
  updateList(lst)
  println(lst)
  </code></pre>
  
  <p>This prints an empty list. However;</p>
  
  <pre><code>public updateList(lst) {
    lst.add("a")
  }
  
  List lst = []
  updateList(lst)
  println(lst)
  </code></pre>
  
  <p>, will print "a" as desired.</p>
  
  <p>I always assumed += was the same as .add(), but obviously not. I assume += is creating a new List, whereas .add() only updated the existing List?</p>