Take
|
This reference topic applies to FQL v4. Go to this page for the latest FQL v10 reference topics. |
Take( num, array )
take( num, array )
Take( num, array )
Take( num, array )
Take( num, array )
Take( num, array )
Description
The Take function returns a new array of the same type as the
array parameter that contains num elements from the head of the
provided array. If num is zero or negative, the resulting array is
empty.
When applied to a Page, the returned page’s "after" cursor is adjusted to only cover the taken elements. As special cases:
-
If
numis negative,afteris set to the same value as the original page’s "before". -
If all elements from the original page were taken,
afterdoes not change.