orangy
inline fun <T> MutableList<T>.update(index: Int, f: T.() -> T) = set(index, f(get(index)))
data class A(val name: String) fun test() { listOf(A("a")).mutate { update(0) { copy(name = "b") } } }