reduce

Function reduce 

Source
pub fn reduce<T: Copy + MaybeSendSync, Op: ElementOp<T>, M, R, U>(
    src: &StridedView<'_, T, Op>,
    map_fn: M,
    reduce_fn: R,
    init: U,
) -> Result<U>
where M: Fn(T) -> U + MaybeSync, R: Fn(U, U) -> U + MaybeSync, U: Clone + MaybeSendSync,
Expand description

Full reduction with map function: reduce(init, op, map.(src)).