code: function exec(batch) {
      var context = batch.__context__
          , methods = batch.__methods__
  
      loop()
  
      function loop(err) {
          if (err) {
              return batch.emit("error", err)
          }
  
          var command = context.shift()
              , name = command[0]
              , args = command[1]
              , lastIndex = args.length - 1
              , callback = args[lastIndex]
  
          if (typeof callback === "function") {
              args.splice(lastIndex, 1, intercept)
          } else {
              args.push(loop)
          }
  
          methods[name].apply(methods, args)
  
          function intercept(err) {
              if (err) {
                  return callback(err)
              }
  
              if (context.length === 0) {
                  batch.__context__ = null
              }
  
              callback.apply(this, arguments)
  
              if (context.length !== 0) {
                  loop()
              } else {
                  batch.emit("finish")
              }
          }
      }
  }
docs: /*
  If there is an error not handled by a user callback emit
  error event.
  
  If command has no user callback pass loop as callback and run
  it.
  
  If command has user callback then ensure we nuke the
  __context__ of this batch before calling the callback
  to ensure that new batches created in the callback
  work as expected.
  
  If there are more commands in the batch after the user
  callback then continue looping.