protocol
List of numbers protocol.
Paulo Moura
1.2
2008/9/15
static, context_switching_calls
(no dependencies on other files)
Calculates the product of all list numbers. Fails if the list is empty.
static
product(List,Product)
product(+list(number),?number) – zero_or_one
Calculates the sum of all list numbers. Returns zero if the list is empty.
static
sum(List,Sum)
sum(+list(number),?number) – one
Calculates the average (i.e. arithmetic mean) of a list of numbers. Fails if the list is empty.
static
average(List,Average)
average(+list(number),?float) – zero_or_one
(none)
(none)