function foo(s) {
function generator(i) {
return function () {
return i;
};
}
var r = new Array(s);
for (var i = 0; i < s; i++) {
r[i] = generator(i);
}
return r;
}
console.log(foo(1000)[42]());
Using Function.prototype.bind(): function foo(s) {
function generator(i) {
return i;
}
var r = new Array(s);
for (var i = 0; i < s; i++) {
r[i] = generator.bind(window, i);
}
return r;
}
console.log(foo(1000)[42]()); function callback(module1, object, module2) { ... }
require(['some-module-ID', object, 'another-module-ID'], callback);
Thus I got something similiar to Function.bind() for free.
But yeah basically "Kleidermacher" was historically a genderless term for quite a long time (potentially always) and was then gendered again, by people who seemingly misunderstood the generic masculinum. The people who made this worse misunderstood that sexus and genus are two different things.
As I explained before, this is quite ironic given that the -in suffix is now being said to be not inclusive.