fold — accumulate with initial value. reduce — accumulate without initial.
fold:
reduce:
1let v = vec![1, 2, 3, 4, 5];23// fold: 154let sum = v.iter().fold(0, |acc, &x| acc + x);56// reduce: Some(15)7let sum = v.iter().reduce(|acc, &x| acc + x);
Key: fold with initial, reduce without.