pub fn map_reduce<T, R, M, Red>( items: Vec<T>, map_fn: M, reduce_fn: Red, initial: R, ) -> Rwhere T: Send + Sync, R: Send + Sync + Clone, M: Fn(T) -> R + Send + Sync, Red: Fn(R, R) -> R + Send + Sync,
Map-reduce pattern: parallel map followed by reduce