Codebox Operators list.slice

list.slice

Slices input list into two lists

list.slice(input, size): [out1, out2]

Arguments:

Arguments

NameTypeDefaultDescription
inputlist

The input list to slice.

sizenumber

The size of the left output list. The right list will contain all remaining elements.

Returns

NameTypeDescription
out1list

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.

out2list

The right list contains all elements of the input list that are not included in the left output list.