Example of use of ArraySlices with the same reduce algorithm written in arrays and slices (iterative and recursive).