how can I write increment in Scala? : <p>Is there a way I can write this Java code in Scala:</p>

<pre><code>int foo () { return this.i++; }
</code></pre>

<p>other than:</p>

<pre><code>def foo : int = { 
  val t = this.i 
  this.i += 1
  t
}
</code></pre>
