code: function logify(fn) {
    return function() {
      console.log("entering", fn.name);
      var ret = fn.apply(this, arguments);
      console.log("leaving", fn.name);
      return ret;
    };
  }
docs: Make a version of the function which logs entry and exit.