anchor.diff:                                  (lambda (&rest rest)
                                     (declare (ignore rest))
                                     (on-client-write client)))
  -          (write-to-client client (format nil "~&Hello. Welcome to Sykosomatic.~%"))
  -          (let ((next-handler (make-instance 'login-handler :client client)))
  -            (setf (input-handler client) next-handler)
  -            (init next-handler))
  -          client)))))
  +          (init client))))))
   
   (defgeneric dispatch-events (service-provider)
     (:method ((sp tcp-service-provider))
  
positive.code: 
  (defmethod update ((server tcp-service-provider))
    (dispatch-events server)
    (maphash (lambda (k client) (declare (ignore k)) (update client)) (clients server)))
  
  ;;;
  ;;; Input handlers
  ;;;
  (defclass input-handler ()
    ((input :accessor input :initarg :input)
     (client :initarg :client :accessor client)))
  
  (defclass login-handler (input-handler) ())
  (defmethod init ((handler login-handler))
    (write-to-client (client handler) (format nil "~&Please enter your name: ")))
  (defmethod update ((handler login-handler))
    (when (input handler)
      (setf (avatar (client handler))
            (input handler))
      (let ((next-handler (make-instance 'gameplay-handler :client (client handler))))
        (setf (input-handler (client handler)) next-handler)
        (init next-handler))))
  
  (defclass gameplay-handler (input-handler) ())
  (defmethod init ((handler gameplay-handler))
    (broadcast-to-provider (service-provider (client handler))
                           (format nil "~A enters the world.~%" (avatar (client handler)))))
  (defmethod update ((handler gameplay-handler))
    (cond ((string-equal (input handler) "look")
           (write-to-client (client handler) (format nil "You see nothing in particular.~%")))
          (t
           (write-to-client (client handler) (format nil "You say, ~S~%" (input handler)))
           (broadcast-to-provider (service-provider (client handler))
                                  (format nil "~A says, ~S~%" (avatar (client handler))
                                          (input handler))))))
  
  (defclass query-handler (input-handler)
    ((gameplay-handler :initarg :gameplay-handler :accessor gameplay-handler)
     (question :initarg :question :accessor question)))
  
negative.code:              (write-to-client client text))
             (clients provider)))
  
  (defmethod init ((client tcp-client))
    (write-to-client client (format nil "~&Hello. Welcome to Sykosomatic.~%"))
    (setf (input-handler client) (make-login-handler client)))
  
  (defmethod update ((client tcp-client))
    (let ((input (read-line-from-client client)))
      (when input (handle-line client input))))
  
  (defmethod teardown ((client tcp-client))
    nil)
  
  ;;;
  ;;; TCP service
  