How to use kotlin run function
Fri, Mar 25, 2016I don’t know that how to use run function in Kotlin. You might use as follows.
On kotlinc-jvm
>>> val caller = null ?: run { println("init"); {} }
init
>>> caller()
kotlin.Unit
I don’t know that how to use run function in Kotlin. You might use as follows.
On kotlinc-jvm
>>> val caller = null ?: run { println("init"); {} }
init
>>> caller()
kotlin.Unit