anchor.diff:             (return (1+ i))))))))
   
   ;; HTTP Peer
  -(defclass http-peer ()
  +(defclass http-peer (emitter)
     ((socket :initarg :socket
              :accessor sock)
      (parser :accessor parser)))
   
   (defmethod initialize-instance :after ((peer http-peer) &key)
     (setf (parser peer) (make-instance 'request-parser :peer peer))
  +
  +  (add-listener peer "error"
  +                (lambda (e)
  +                  (format t "Error: ~S~%" e)
  +                  (close (sock peer))))
   
     (add-listener (sock peer) "data"
                   (lambda (data)
  
positive.code: 
  (defstate request-parser :read-request (parser data)
    (flet ((finish (at)
             (unless (>= at (length data))
               (setf (buffer parser) (subseq data at (length data))))
  
             (values
              (if (eql (state (request-fsm parser)) :done) :read-headers nil)
              (buffer parser))))
  
      (finish
       (dotimes (i (length data) i)
         (funcall (request-fsm parser) (aref data i))
         (when (eql (state (request-fsm parser)) :done)
           (return (1+ i)))))))
  
  
negative.code: 
  (defstate request-fsm :initial (fsm data)
    (format t "~S => ~S~%" fsm (code-char data))
    (cond ((char-equal (code-char data) #\Return)
           :seek-newline)
          ((char-equal (code-char data) #\Newline)
           :error)))
  
  (defstate request-fsm :seek-newline (fsm data)
    (if (char-equal (code-char data) #\Newline)
  