Replaced inject by its synonym reduce.