4 ms·
You have an unnecessary lambda^W anonymous function expression in 'mapWith': function mapWith (fn) { return function (list) { return map(list, func
by ScottBurson 14y ago
You have an unnecessary lambda^W anonymous function expression in 'mapWith':
function mapWith (fn) {
return function (list) {
return map(list, function (something) {
return fn(something)
});
};
};
could be simplified to:
function mapWith (fn) {
return function (list) {
return map(list, fn);
};
};
- raganwald 14y agohey Scott, I just saw this. It depends on whether your map implementation expects a unary function or whether it injects optional additional arguments like the index, and whether your function is unary or accepts optional other arguments.