klyn.collections.List.addAll
method

    public addAll(index as Int, values as IList<T>) as Void

Description

Inserts every element from a read-only list at the requested index.

Existing elements at and after the index are shifted to the right.

Parameters

Parameter | Description
--- | ---
`index` | Zero-based insertion index in `[0, size]`.
`values` | Elements inserted in iteration order.

Throws

- IndexException if index is outside `[0, size]`.

Example

    import klyn.collections

    data = [10, 40]
    data.addAll(1, [20, 30])
    print(data)  # [10, 20, 30, 40]