Files
T
2020-03-19 09:51:01 +03:00

8 lines
145 B
Kotlin
Vendored

fun <T, R> apply(x: T, f: (T) -> R): R = f(x)
fun foo(i: Int) {}
fun foo(s: String) {}
val x1 = apply(1, ::foo)
val x2 = apply("hello", ::foo)