method List.product
The product of the elements (1 for an empty list); panics on overflow like *.
Example:
fn main() io {
let xs: List<i64> = [1, 2, 3, 4]
print("{xs.product()}")
}Вывод
24
pub(api) fn product() -> i64Сложность. O(n).
С версии. 1.0.0-beta
Возвращает
i64
Эффекты
не объявлены (чистая, пока тело не говорит иное)
Определено в: std/core/numbers.oxl:4507