8 lines
122 B
Kotlin
Vendored
8 lines
122 B
Kotlin
Vendored
inline fun <T, R> T.use(block: (T) -> R): R {
|
|
return block(this)
|
|
}
|
|
|
|
fun foo() {
|
|
42.use { i<caret>t.toString() }
|
|
}
|