Partial sum implementation

I've reformatted the source with continuation indent width equals 2 and updated the clang-format pr. Let me know what you think.