Implemented sumSlice.