list.slice
Slices input list into two lists
list.slice(input, size): [out1, out2]
Arguments:
Arguments
Name | Type | Default | Description |
---|---|---|---|
input | list | The input list to slice. | |
size | number | The size of the left output list. The right list will contain all remaining elements. |
Returns
Name | Type | Description |
---|---|---|
out1 | list | The left list is the first N elements of the input list, where N is the specified size. If the size is larger than the incoming list, the entire list is output. |
out2 | list | The right list contains all elements of the input list that are not included in the left output list. |