Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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);
    };
  };


hey 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: