Actually looking at my source, I made this extensi...
# stdlib
r
Actually looking at my source, I made this extension function:
Copy code
inline fun <T> List<T>.mutate(f: MutableList<T>.() -> Unit): List<T> {
  val mutableList = this.toMutableList()
  f(mutableList)
  return mutableList
}