On temporal aggregators and dynamic programming