function reduce(c,g,d){var f=arguments.length>2,b=d;if(c==null||!c.length){if(!f){throw new Error("reduce of empty array with no initial value")}else{return d}}var e=-1,a=c.length;while(++e<a){if(!f){b=c[e];f=true}else{b=g(b,c[e],e,c)}}return b}module.exports=reduce;