for the counter remains immutable, but the the value is not. I was thinking that companion objects was the right way, but this seems more like for static methods.
j
Jonathan Walsh
10/08/2018, 11:01 PM
Maybe I’m missing something, but couldn’t you just make name a
val
while value is a
var
?
m
marcelo
10/09/2018, 1:21 AM
thanks for following up Jonathan. Perhaps, I was thinking more of
java
the parameter as an object - since it's a key/pair. Maybe a