3 ms·
Some questions from JS novice: Why map isn't implemented: function map(fun, coll) { if (exists(coll)) return _map(fun)(coll); return _map(fun)
by dhucerbin 13y ago
Some questions from JS novice:
Why map isn't implemented:
function map(fun, coll) {
if (exists(coll)) return _map(fun)(coll);
return _map(fun);
}
Why use arguments when you can name your parameter in declaration?
And why _map is defined in global scope? Shouldn't it be better defined inside map function? What are up/downsides in performance for this move?