What/where are the practical uses of the partial_sum algorithm in STL?
partial_sum
What are some other interesting/non-trivial examples or use-cases?
I often use partial sum not to sum but to calculate the current value in the sequence depending on the previous.
For example, if you integrate a function. Each new step is a previous step, vt += dvdt or vt = integrate_step(dvdt, t_prev, t_prev+dt);.
vt += dvdt
vt = integrate_step(dvdt, t_prev, t_prev+dt);