anchor.diff:  
   ;;; state-switch-event
   
  -(let (events)
  +(let (event-rand)
     (defun new-state-switch-event (rand)
  -    (let ((ev (qnew "QEvent(QEvent::Type)" +state-switch-event+)))
  -      (push (list ev rand) events)
  -      ev))
  -  (defun event-rand (event)
  -    (second (find event events :key 'first :test 'qeql))))
  +    (setf event-rand rand)
  +    (qnew "QEvent(QEvent::Type)" +state-switch-event+))
  +  (defun event-rand ()
  +    event-rand))
   
   ;;; state-switch-transition
   
  
positive.code:          (item3 (new-graphics-rect-widget "lightblue"))
           (item4 (new-graphics-rect-widget "lightyellow"))
           (items (list item1 item2 item3 item4))
           (scene      (qnew "QGraphicsScene(qreal,qreal,qreal,qreal)" 0 0 300 300))
           (window     (qnew "QGraphicsView(QGraphicsScene*)" scene))
           (machine    (qnew "QStateMachine"))
           (group      (qnew "QState"
  
negative.code:                  (and (= +state-switch-event+
                           (qfun event "type"))
                        (= (transition-rand trans)
                           (event-rand)))))
      trans))
  
  ;;; state-switcher
  