41a416da60
Delete all test methods (and empty test classes), since they'll be auto-generated
10 lines
237 B
Kotlin
10 lines
237 B
Kotlin
class List<T>(val head: T, val tail: List<T>? = null)
|
|
|
|
fun <T> List<T>.mapHead(f: (T)-> T): List<T> = List<T>(f(head), null)
|
|
|
|
fun box() : String {
|
|
val a: Int = List<Int>(1).mapHead{it * 2}.head
|
|
System.out?.println(a)
|
|
return "OK"
|
|
}
|