I was surprised this code doesn't exist in the sta...
# getting-started
n
I was surprised this code doesn't exist in the standard library
Copy code
fun <T: Any> MutableCollection<in T>.addAll(vararg elements: T) {
  elements.forEach { add(it) }
}