299097d112
(cherry picked from commit 5232af5)
8 lines
169 B
Kotlin
Vendored
8 lines
169 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
|
|
fun List<Int>.transform(x: Int = 0, f: (Int) -> Int) = map { f(it + x) }
|
|
|
|
fun bar(x: Int) = x * x
|
|
|
|
val y = listOf(1, 2, 3).transform { <caret>bar(it) }
|