karelpeeters
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 }