Solution
Speaker Notes
- Note that in
normalize
we were able to do*item /= mag
to modify each element. This is because we’re iterating using a mutable reference to an array, which causes thefor
loop to give mutable references to each element.