fn det_sum<T>(n: usize, f: impl Fn(usize) -> T + Sync) -> Twhere T: Copy + Send + Sync + Add<Output = T> + Default,
A sum over 0..n in fixed chunks, so the result does not depend on the thread count
0..n