15 lines
330 B
Kotlin
Vendored
15 lines
330 B
Kotlin
Vendored
fun withContext(f: @ContextFunctionTypeParams(count = 1) Function1<String, String>): String {
|
|
return f.invoke(p1 = "OK")
|
|
}
|
|
|
|
fun callWithContext(f: Function1<String, String>): String {
|
|
return withContext(f = f)
|
|
}
|
|
|
|
fun box(): String {
|
|
return callWithContext(f = local fun <anonymous>(s: String): String {
|
|
return s
|
|
}
|
|
)
|
|
}
|