1/6

fold carries an accumulator through the whole sequence. It is the most general consumer there is — sum, count, max and collect are all folds underneath.

let total = latencies.iter().fold(0u64, |acc, n| acc + n);

Three parts: the initial value, the accumulator, the current element. The closure returns the next accumulator.

reduce is fold with no initial value — it uses the first element instead, and therefore returns Option because an empty sequence has no answer:

let worst = latencies.iter().copied().reduce(u64::max);   // Option<u64>