Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Latest commit

 

History

History
42 lines (38 loc) · 1.13 KB

List.InsertRange.md

File metadata and controls

42 lines (38 loc) · 1.13 KB

List.InsertRange

Inserts values into a list at the given index.

function (list as list, index as number, values as list) as list

Description

Returns a new list produced by inserting the values in values into list at index. The first position in the list is at index 0.

  • list: The target list where values are to be inserted.
  • index: The index of the target list(list) where the values are to be inserted. The first position in the list is at index 0.
  • values: The list of values which are to be inserted into list.
  • Category

    List.Selection

    Examples

    Insert the list ({3, 4}) into the target list ({1, 2, 5}) at index 2.

    List.InsertRange({1, 2, 5}, 2, {3, 4})
    

    { 1, 2, 3, 4, 5 }


    Insert a list with a nested list ({1, {1.1, 1.2} }) into a target list ({2, 3, 4}) at index 0.

    List.InsertRange({2, 3, 4}, 0, {1, {1.1, 1.2} })
    

    { 1, { 1.1, 1.2 }, 2, 3, 4 }