mutateAndSnapshot

inline fun mutateAndSnapshot(mutator: MutableList<E>.() -> Unit): ImmutableList<E>

Mutates this List atomically and returns the new snapshot. mutator can be evaluated multiple times if a concurrent edit occurs.