anchor.diff:  
   ;; Sorting
   
  -(defun sort (key &key (connection *connection*) octets order limit-start limit-end by get alpha)
  +(defun sort (key &key (connection *connection*) (octets nil) order (limit-start 0) limit-end by get alpha)
     "Sort a set or a list according to the specified parameters."
  -  (write-sequence
  -   (babel-streams:with-output-to-sequence (out)
  -     (write-sequence "SORT " out)
  -     (write-key key out)
  -     (when by
  -       (write-sequence " BY " out)
  -       (write-key by out))
  -     (when (and limit-start limit-end)
  -       (write-sequence " LIMIT " out)
  -       (princ limit-start out)
  -       (write-byte 32 out)
  -       (princ limit-end out))
  -     (when get
  -       (when (stringp get)
  -         (setf get (list get)))
  -       (dolist (x get)
  -         (write-sequence " GET " out)
  -         (write-key x out)))
  -     (ecase order
  -       ((:asc :ascending) (write-sequence " ASC" out))
  -       ((:desc :descending) (write-sequence " DESC" out))
  -       ((nil)))
  -     (when alpha
  -       (write-sequence " ALPHA" out))
  -     (write-sequence #(13 10) out))
  -   (connection-stream connection))
  -  (force-output (connection-stream connection))
  -  (translate-result (read-reply connection) octets nil nil))
  +  (let ((sequences '())
  +        (nsequences 0))
  +    (flet ((add-sequence (sequence)
  +             (push sequence sequences)
  +             (incf nsequences)))
  +      (add-sequence "SORT")
  +      (add-sequence (key-sequence key))
  +      (when by
  +        (add-sequence "BY")
  +        (add-sequence (key-sequence by)))
  +      (when (and limit-start limit-end)
  +        (add-sequence "LIMIT")
  +        (add-sequence (princ-to-string limit-start))
  +        (add-sequence (princ-to-string limit-end)))
  +      (when get
  +        (when (stringp get)
  +          (setf get (list get)))
  +        (dolist (x get)
  +          (add-sequence "GET")
  +          (add-sequence (key-sequence x))))
  +      (ecase order
  +        ((:asc :ascending) (add-sequence "ASC"))
  +        ((:desc :descending) (add-sequence "DESC"))
  +        ((nil)))
  +      (when alpha
  +        (add-sequence "ALPHA")))
  +    (write-sequence
  +     (babel-streams:with-output-to-sequence (out)
  +       (write-multi-bulk (nreverse sequences) nsequences out))
  +     (connection-stream connection))
  +    (force-output (connection-stream connection))
  +    (translate-result (read-reply connection) octets nil nil)))
   
   ;; Transactions
   
  
positive.code:       (58 (values (parse-integer (babel:octets-to-string line))))
        (45 (error 'redis-error :text (babel:octets-to-string line))))))
  
  (defmacro define-command (name &rest spec)
    (let ((booleanize (when (eq (car spec) :boolean) (pop spec)))
          (split (when (eq (car spec) :split) (pop spec)))
  
negative.code: (define-command set (key :key) (value :bulk) "Set a key to a string value.")
  (define-command get (key :key) "Return the string value of the key.")
  (define-command getset (key :key) (value :bulk) "Set a key to a string returning the old value of the key.")
  (define-command mget (list keys :key) "Multi-get, return the string values of the keys.")
  (define-command setnx :boolean (key :key) (value :bulk) "Set a key to a string value if the key does not exist.")
  (define-command setex (key :key) (time :integer) (value :bulk) "Set+Expire combo command")
  (define-command mset (list keys/vals :key :bulk) "Set multiple keys to multiple values in a single atomic operation.")
  (define-command msetnx (list keys/vals :key :bulk) "Set multiple keys to multiple values in a single atomic operation if none of the keys already exist.")
  (define-command incr (key :key) "Increment the integer value of key.")
  (define-command incrby (key :key) (integer :integer) "Increment the integer value of key by integer.")
  (define-command decr (key :key) "Decrement the integer value of key.")
  