Partial sum implementation

Once you change the return type, you'll need to change the first parameter to `Rng & rng`.