method List.product
The product of the elements (1 for an empty list); panics on overflow like *.
Example:
fn main() io {
let xs: List<f32> = [1.5, 2.5, 4.0]
print("{xs.product()}")
}Output
15.0
pub(api) fn product() -> f32Complexity. O(n).
Since. 1.0.0-beta
Returns
f32
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/numbers.oxl:5586