https://kotlinlang.org logo
k

karelpeeters

10/21/2017, 4:53 PM
Your code is "compiled" as
Copy code
fun<T, U> MutableList<T>.mapInPlace(f: (T) -> U): MutableList<U> {
    this as MutableList<U>
    for (i in (0..size)) {
        val t: T = this[i]
        this[i] = f(t)
    }
    return this
}