Name:
head
gives the first element of a list.
Library name:
sollya_obj_t sollya_lib_head(sollya_obj_t)
Usage:
head
(
L
) :
list
->
any type
Parameters:
L
is a list.
Description:
head
(
L
) returns the first element of the list
L
. It is equivalent to L[0].
If
L
is empty, the command will fail with an error.
Example 1:
> head([|1,2,3|]);
1
> head([|1,2...|]);
1
See also:
tail
,
revert
Go back to the list of commands