Don Raul
fun<T, U> MutableList<T>.mapInPlace(f: (T) -> U): MutableList<U> = (this as MutableList<U>).apply { for (i in (0..size)) { val t: T = this@mapInPlace[i] this@apply[i] = f(t) } }