anchor.diff:                                  :left (make-s-diet-node :bottom bottom :top (1- a-val) :left left :right nil)))))))))
   
   (defun diet-height (a-tree)
  -  (cond
  -    ((null a-tree) 0)
  -    ((and (null (s-diet-node-right a-tree)) (null (s-diet-node-left a-tree))) 0)
  -    ((null (s-diet-node-left a-tree)) (1+ (diet-height (s-diet-node-right a-tree))))
  -    ((null (s-diet-node-right a-tree)) (1+ (diet-height (s-diet-node-left a-tree))))
  -    (t 
  -     (1+ (max (diet-height (s-diet-node-right a-tree))
  -               (diet-height (s-diet-node-left a-tree)))))))
  +  (if (null a-tree)
  +      0
  +      (with-slots (left right) a-tree
  +        (cond
  +          ((and (null right) (null left)) 0)
  +          ((null left) (1+ (diet-height right)))
  +          ((null right) (1+ (diet-height left)))
  +          (t
  +           (1+ (max (diet-height right) (diet-height left))))))))
   
   (defun diet-balance (a-tree)
     (cond
  
positive.code:           (diet-height (s-diet-node-left a-tree))))))
  
  (defun diet-max-interval (a-tree)
    (cond
      ((null a-tree) 0)
      ((and (null (s-diet-node-left a-tree)) (null (s-diet-node-right a-tree)))
       (1+ (- (s-diet-node-top a-tree) (s-diet-node-bottom a-tree))))
      ((null (s-diet-node-left a-tree))
       (max (1+ (- (s-diet-node-top a-tree) (s-diet-node-bottom a-tree)))
            (diet-max-interval (s-diet-node-right a-tree))))
      ((null (s-diet-node-right a-tree))
       (max (1+ (- (s-diet-node-top a-tree) (s-diet-node-bottom a-tree)))
            (diet-max-interval (s-diet-node-left a-tree))))
      (t
       (max (diet-max-interval (s-diet-node-left a-tree))
            (diet-max-interval (s-diet-node-right a-tree))))))
  
  
  (defun diet-r-rotate (a-tree)
    (if (null a-tree)
        nil
        (let ((l (s-diet-node-left a-tree))
              (r (s-diet-node-right a-tree)))
          (if (or (null l) (null r))
              a-tree
              (let ((ll (s-diet-node-left l))
                    (lr (s-diet-node-right l)))
                (make-s-diet-node :bottom (s-diet-node-bottom l) :top (s-diet-node-top l)
                                  :left ll
                                  :right (make-s-diet-node :bottom (s-diet-node-bottom a-tree) :top (s-diet-node-top a-tree)
  
negative.code:     (t a-diet-node)))
  
  (defun diet-merge (a-tree)
    (with-slots (left right) a-tree
      (cond
        ((null right) left)
        ((null left) right)
        (t
         (if (zerop (random 2))
             (multiple-value-bind (bottom top new-left-subtree) (split-max left)
               (make-s-diet-node :bottom bottom :top top :left new-left-subtree :right right))
             (multiple-value-bind (bottom top new-right-subtree) (split-min right)
               (make-s-diet-node :bottom bottom :top top :left left :right new-right-subtree)))))))
  
  (defun diet-remove (a-val a-tree)
    (cond
  