How about this reduce here? The std tells me it should take a closure as a parameter but there is only a return value f32::max here? The result, 2.4 is also confusing. Could you explain what happen in reduce here?
reduce doesn't just take a closure. It takes FnMut(Self::Item, Self::Item) -> Self::Item, which means any closure or function that takes 2 arguments and returns an item.