docs: function partitionHandlers(oldState, newState) {
      var oldHandlers = oldState.handlerInfos;
      var newHandlers = newState.handlerInfos;
  
      var handlers = {
        updatedContext: [],
        exited: [],
        entered: [],
        unchanged: []
      };
  
      var handlerChanged,
          contextChanged = false,
          i,
          l;
  
      for (i = 0, l = newHandlers.length; i < l; i++) {
        var oldHandler = oldHandlers[i],
            newHandler = newHandlers[i];
  
        if (!oldHandler || oldHandler.handler !== newHandler.handler) {
          handlerChanged = true;
        }
  
        if (handlerChanged) {
          handlers.entered.push(newHandler);
          if (oldHandler) {
            handlers.exited.unshift(oldHandler);
          }
        } else if (contextChanged || oldHandler.context !== newHandler.context) {
          contextChanged = true;
          handlers.updatedContext.push(newHandler);
        } else {
          handlers.unchanged.push(oldHandler);
        }
      }
  
      for (i = newHandlers.length, l = oldHandlers.length; i < l; i++) {
        handlers.exited.unshift(oldHandlers[i]);
      }
  
      handlers.reset = handlers.updatedContext.slice();
      handlers.reset.reverse();
  
      return handlers;
    }