solr/server/solr-webapp/webapp/js/lib/jquery.sammy.js
function() {
      var context = this,
          args = _makeArray(arguments),
          fun  = args.shift();

      if (_isArray(args[0])) { args = args[0]; }

      return this.then(function(content) {
        args.push(function(response) { context.next(response); });
        context.wait();
        fun.apply(fun, args);
        return false;
      });
    }
function() {
      var context = this,
          args = _makeArray(arguments),
          fun  = args.shift();

      if (_isArray(args[0])) { args = args[0]; }

      return this.then(function(content) {
        args.push(function(response) { context.next(response); });
        context.wait();
        fun.apply(fun, args);
        return false;
      });
    }
defers the call of function to occur in order of the render queue. The function can accept any number of arguments as long as the last argument is a callback function. This is useful for putting arbitrary asynchronous functions into the queue. The content passed to the callback is passed as `content` to the next item in the queue.  === Example  this.send($.getJSON, '/app.json') .then(function(json) { $('#message).text(json['message']); });