Function: ADJUST-HEIGHT

Source

(defun adjust-height (node)
  (when node
    (with-slots (left right height) node
      (setf height
	    (1+ (max (if left (height left) -1)
		     (if right (height right) -1))))
      node)))
Source Context