Refactor dict_reduce to process dict values left-to-right, rather than processing them at once.