Gary Guo (2014-12-20T12:47:28.000Z)
nbdd0121 at hotmail.com (2014-12-23T12:39:06.443Z)
I think extending standard libraries/functions is not the most elegant approach. I think what you suggest is basically trying to bind some parameter that isn't the first few continuous parameter (in this case, it is the 4th parameter) while keeping the first few parameter unbound. I believe there should be a way created to bind any parameter we want instead of extending the standard library we have. For example, in your case, ```js [1,2,3].forEach(myCallback.bindParameter(3, 'additionalFoo')) ``` might be a better solution, btw, use the arrow function, it can be written as ```js [1,2,3].forEach((element, count, array) => myCallback(element, count, array, 'additionalFoo')); ``` which isn't too complicated, and at least to me, it is acceptable. bindParameter function is not very hard to implement: ```js Function.prototype.bindParameter=function(idx, val){ var func=this; return function(){ var arg=Array.prototype.slice.call(arguments); arg[idx]=val; func.apply(this, arg); } } ```