anchor.diff:                                   (encoding :utf-8))
                              &body body)
     "Evaluate BODY with the current connection bound to a new connection
  -specified by HOST, PORT, and ENCODING arguments."
  +specified by the given HOST, PORT, and ENCODING."
     `(let ((*connection* (make-instance 'redis-connection
                                         :host ,host
                                         :port ,port
  
positive.code:               (progn ,@body))
               (otherwise
                (error 'redis-bad-reply
                       :message (format nil
                                        "Received ~C as an initial reply byte." ,char)))))))))
  
  (def-expect-method :ok
      (assert (string= reply "OK"))
  
negative.code:   (:documentation "Representation of a Redis connection."))
  
  (defmethod connection-external-format ((connection redis-connection))
    "Return the external format of CONNECTION based on its encoding."
    (make-external-format (connection-encoding connection) :eol-style :crlf))
  
  (defmacro signal-connection-error-with-reconnect-restart (&key message comment restart)
    "Signal the condition of type REDIS-CONNECTION-ERROR denoted by the given
  MESSAGE and COMMENT offering a :reconnect restart given by RESTART."
    `(restart-case (error 'redis-connection-error
                          :message ,message
                          :comment ,comment)
       (:reconnect ()
         :report "Try to reconnect."
         ,restart)))
  
  (defmacro provide-reconnect-restart (expression &body body)
    "When, during the execution of EXPRESSION, an error occurs that can break
  the connection stream, a condition of type REDIS-CONNECTION-ERROR is raised
  offering a :reconnect restart whose body is given by BODY."
    (with-unique-names (err)
      `(handler-case ,expression
         (connection-refused-error (,err)
           ;; Errors of this type commonly occur when there is no Redis server
           ;; running, or when one tries to connect to the wrong host or port.
           ;; We anticipate this by providing a helpful comment.
           (signal-connection-error-with-reconnect-restart
            :message ,err
            :comment "Make sure Redis server is running and check your connection parameters."
            :restart (progn ,@body)))
         ((or socket-error stream-error) (,err)
           (signal-connection-error-with-reconnect-restart
            :message ,err
            :restart (progn ,@body))))))
  
  (defmethod initialize-instance :after ((connection redis-connection) &key)
    (open-connection connection))
    
  (defun open-connection (connection)
    "Create a socket connection to the host and port of CONNECTION and
  set the stream of CONNECTION to the associated stream."
    (provide-reconnect-restart
        (setf (connection-stream connection)
              (make-flexi-stream
               (socket-stream
  