forEach等Javascript数组方法有一个thisArg参数,用作调用回调的上下文:array.forEach(callback[,thisArg])every、some、filter和map也是如此。但是,reduce和reduceRight没有这样的参数。这样做有什么特别的原因,或者没有必要这样做吗?例如,考虑以下使用reduceRight实现的功能组合:functioncompose(){varfns=[].slice.call(arguments,0);returnfunctionresult(){returnfns.reduceRight(function(prev,