A function that reduces or accumulates values of type N by applying a custom logic and returning the accumulated result.
The type of the accumulated result.
The type of the values being processed in the reduction.
The value being processed in the reduction.
The index of the current value in the reduction (optional).
The current accumulated result.
A function that reduces or accumulates values of type N by applying a custom logic and returning the accumulated result.