News for hackers. Stuff that matters.
Re:Javascript patterns by raganwald on Wednesday January 01, 2014 @10:09PM (#6997979)
We have a special on combinators this evening. Why not try a side order?

    function explicitize (fn) {
      return function () {
        return fn.apply(null, p(arguments, this));
      }
    }
Now you can write:

    foo.prototype.bar = explicitize(function (myself, something, etc) {
      // ...
    }
Re:Javascript patterns by tracker1 on Thursday January 02, 2014 @11:32AM (#7000395)
that's pretty much what I meant by wrapped in a utility function... generally... something akin to explitize(ConstructorName, 'methodname') .. so that the passthrough call(s) can be shimmed/mocked for testing...