Function head()
returns the first element of the array, namely, the element with index [0]
.
Arguments:
- Array <array>
Returns:
- First element <string>
Constant
Example: Return the 1st element of array [[1,2,3],[4,5,6]]
return head([[1,2,3],[4,5,6]])
Function
Example: Return the 1st element of each array in an array list
uncollect [[1,2,3],[4,5,6]] as a
return head(collect(a))
Alias
Example: Return the 1st element of each array in an array list
uncollect [[1,2,3],[4,5,6]] as a
return head(a)