code: function trampoline (fn) {
    return function () {
      var result = fn.apply(this, arguments);
  
      while ('function' == typeof result) {
        result = result();
      }
  
      return result;
    };
  }
docs: Generic thunk-based "trampoline" helper function.
  
  @param {Function} input function
  @return {Function} "trampolined" function
  @api private