What is the simplest and best readable way to increment nullable Int in Kotlin? Is there any other way than doing this?
var myInt: Int? = 3
myInt = if(myInt!=null) myInt+1 else null
This is quite fine if myInt is simple variable, but it can grow very long when myInt is some longer expression.