Great stuff! One minor suggestion, completely beside the point so please forgive me: a safer and perhaps more idiomatic way to implement the multiply_safe function would be with a functional-style one-liner: fn multiply_safe(a : Vec , b : Vec ) -> Vec { if a.len() != b.len() { panic!("The two vectors differ in length!"); } return a.iter().zip(b.iter()).map(|(x, y)| x * y).collect() } Safer because you don't manipulat…
Frequently functional style optimizes better than the equivalent loop and index implementations because the iterator functional implementation cannot go out of bounds on the array, so the bounds checks that are implicit in indexing are elided.