1 2 3 4 5 6 7 8 9 10 11 12
use std::ops; pub(crate) fn multiply_list<T>(list: &[T], init: T) -> T where T: ops::MulAssign + Copy, { let mut result: T = init; for x in list { result *= *x } result }