mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
11 lines
306 B
Plaintext
Vendored
11 lines
306 B
Plaintext
Vendored
// "Create function 'foo'" "true"
|
|
fun <T, U> T.map(f: T.() -> U) = f()
|
|
|
|
fun consume(s: String) {}
|
|
|
|
fun test() {
|
|
fun foo(i: Int): String {
|
|
<selection>TODO("not implemented") //To change body of created functions use File | Settings | File Templates.</selection>
|
|
}
|
|
consume(1.map(::foo))
|
|
} |