2 ms·
You could also mention 'def foo_=(x: Int) : Unit' which is a setter. 'lazy val foo: Int' which is immutable but doesn't execute its right hand side until the
by benjaminjackman 9y ago
You could also mention
'def foo_=(x: Int) : Unit' which is a setter.
'lazy val foo: Int' which is immutable but doesn't execute its right hand side until the first time it called and then stores and returns the value returned by the right hand side everytime.
not that they are different enough to be mentioned