FIRST_N

Returns the first N elements of an array.

Format

FIRST_N (A,N)

Arguments

 
A
An array.
N
Number of elements to return.

Examples

The following examples illustrate the use of the FIRST_N function:
 
Function
FIRST_N ({ }, 3)
Result
{}
 
Function
FIRST_N ({1,2,3,4}, 2)
Result
{1,2}
 
Function
FIRST_N ({1,2,3,}, 4)
Result
{1,2,3}