Modify response of reduce and reduceRight