pub fn parallelize<T: Send, F: Fn(&mut [T], usize) + Send + Sync + Clone>( v: &mut [T], f: F, )
This simple utility function will parallelize an operation that is to be performed over a mutable slice.