First
[expr]First
[expr, def] First[expr]
is equivalent to expr[[1]]
.
First[{a, b, c}]
The first argument need not be a list:
First[a + b + c]
However, the first argument must be Nonatomic when there is a single argument:
First[x]
Or if it is not, but a second default argument is provided, that is evaluated and returned:
First[10, 1+2]
First[{}]
{} has zero length and no first element.
As before, the first argument is empty, but a default argument is given, evaluate and return the second argument:
First[{}, 1+2]