Name:
length
computes the length of a list or string.
Library name:
sollya_obj_t sollya_lib_length(sollya_obj_t)
Usage:
length
(
L
) :
list
->
integer
length
(
s
) :
string
->
integer
Parameters:
L
is a list.
s
is a string.
Description:
length
returns the length of a list or a string, e.g. the number of elements or letters.
The empty list or string have length 0. If
L
is an end-elliptic list,
length
returns +Inf.
Example 1:
> length("Hello World!");
12
Example 2:
> length([|1,...,5|]);
5
Example 3:
> length([| |]);
0
Example 4:
> length([|1,2...|]);
infty
Go back to the list of commands