Function beagle::scalar_array::vec_array::fold [] [src]

pub fn fold<S, R, F0, F, O>(s: R::Type, f0: F0, f: F) -> O where
    R: Dim<S>,
    F0: FnOnce(S) -> O,
    F: FnMut(O, S) -> O,
    R::Smaller: Array<S>, 

Fold all the elements in a 1d array. The first element is mapped with f0, then folding continues with f for other elements.