Move built-in reduce functions to utils