Added a data structure for monoid sequences that can compute partial sums quickly.