List.RemoveFirstN

List.RemoveFirstN

Returns a list that skips the specified number of elements at the beginning of the list.

function (list as list, optional countOrCondition as nullable any) as list

Description

Returns a list that removes the first element of list list. If list is an empty list an empty list is returned. This function takes an optional parameter, countOrCondition, to support removing multiple values as listed below.

Category

List.Transformation functions

Examples

Create a list from {1, 2, 3, 4, 5} without the first 3 numbers.

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

{4, 5}

Create a list from {5, 4, 2, 6, 1} that starts with a number less than 3.

List.RemoveFirstN({5, 4, 2, 6, 1}, each _ > 3)

{2, 6, 1}