anchor.diff:      (t a-diet-node)))
   
   (defun diet-merge (a-tree)
  -  (cond
  -    ((null (s-diet-node-right a-tree)) (s-diet-node-left a-tree))
  -    ((null (s-diet-node-left a-tree)) (s-diet-node-right a-tree))
  -    (t
  -     (if (zerop (random 2))
  -         (multiple-value-bind (bottom top new-left-subtree)
  -             (split-max (s-diet-node-left a-tree))
  -           (make-s-diet-node :bottom bottom :top top
  -                             :left new-left-subtree :right (s-diet-node-right a-tree)))
  -         (multiple-value-bind (bottom top new-right-subtree)
  -             (split-min (s-diet-node-right a-tree))
  -           (make-s-diet-node :bottom bottom :top top
  -                             :left (s-diet-node-left a-tree) :right new-right-subtree))))))
  +  (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
  
positive.code:                                 :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)))))))
  
  (defun diet-balance (a-tree)
    (cond
  
negative.code: (defun diet-l-rotate (a-tree)
    (if (null a-tree)
        nil
        (with-slots ((l left) (r right))  a-tree
          (if (or (null l) (null r))
              a-tree
              (with-slots ((rl left) (rr right)) r
                (make-s-diet-node :bottom (s-diet-node-bottom r) :top (s-diet-node-top r)
                                  :left (make-s-diet-node :bottom (s-diet-node-bottom a-tree) :top (s-diet-node-top a-tree)
                                                          :left l :right rl)
                                  :right rr))))))
  
  (defun diet-count-intervals (a-tree)
    (if (null a-tree)
        0
        (with-slots (left right) a-tree
          (if (and (null left) (null right))
              1
              (+ 1 (diet-count-intervals left) (diet-count-intervals right))))))
  