Files
kotlin-fork/nj2k/testData/newJ2k/function/genericMemberFunctionRef.kt
T
2020-07-29 17:50:10 +03:00

12 lines
359 B
Kotlin
Vendored

class TestLambda<T> {
class Box<Q>(private val value: Q) {
fun unbox(): Q {
return value
}
}
fun toStringAllBox(list: List<Box<T>>): String {
return list.stream().map { obj: Box<T> -> obj.unbox() }.map { obj: T -> obj.toString() }
.reduce { s1: String, s2: String -> "$s1, $s2" }.orElse("")
}
}