mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
13 lines
205 B
Kotlin
Vendored
13 lines
205 B
Kotlin
Vendored
|
|
inline fun <T, R> calc(value : T, fn: (T) -> R) : R = fn(value)
|
|
inline fun <T> identity(value : T) : T = calc(value) {
|
|
if (1 == 1) return it
|
|
it
|
|
}
|
|
|
|
fun foo() {
|
|
val x = identity(1)
|
|
}
|
|
|
|
// 1 GOTO
|