addAll

open override fun addAll(elements: Collection<E>): PersistentList<E>(source)

Returns the result of appending all elements of the specified elements collection to this list.

The elements are appended in the order they appear in the specified collection.

Return

a new persistent list with elements of the specified elements collection appended; or this instance if the specified collection is empty.


open override fun addAll(index: Int, c: Collection<E>): PersistentList<E>(source)

Returns the result of inserting the specified c collection at the specified index.

Return

a new persistent list with the specified c collection inserted at the specified index; or this instance if the specified collection is empty.

Throws

if index is out of bounds of this list.