Partial sum implementation

I just never use `std::pair` and that doesn't work with `std::tuple`. Sorry about that.