Ben Chuanlong Du's Blog

It is never too late to learn.

Misc Tips on Kotlin

Comments

  1. Forget to return is a common and tricky mistake in Kotlin!

Unpack Values

In [1]:
val(x, y, z) = listOf(1, 2, 3)
println(x)
println(y)
println(z)
1
2
3
Out[1]:
null
In [ ]:

Comments