batch

open override fun <T> batch(block: MutableList<E>.() -> T): T

Runs the operations within block and then applies them all to the list as a single operation. This reduces the set of events that would normally trigger if these operations were done sequentially.

NOTE: This results in a copy of the existing data.

Return

the result of block

Parameters

block

to be run