anchor.diff:          ;; the else never ends
           (subseq program distance-to-first-unmatched-end)
           ;; the else does end
  -        (append (subseq program 
  +        (append (subseq program
                           distance-to-first-unmatched-end
                           (+ distance-to-first-unmatched-end
                              distance-from-first-to-second-unmatched-end
  
positive.code: 
  ;; Internal utilities for measurement and branching
  
  (defun end (qsys) 
    "Marks the end of a measurement branch; has no effect when used
  in a quantum program in any other context." 
    qsys)
  
  (defun distance-to-next-unmatched-end (list &optional 
                                              (num-measures 0) (num-ends 0) 
                                              (distance-so-far 0))
    "Returns 0 if there is no unmatched (end) in list; otherwise returns
  the number of instructions to the next unmatched (end) (counting the (end))."
    (if (null list) 
      0
      (if (eq (caar list) 'end)
        (if (zerop num-measures)
  
negative.code:   "Assuming that a MEASURE form has just been removed from the given
  program, returns the remainder of the program without the ELSE (measure-0)
  branch."
    (let* ((distance-to-first-unmatched-end
            (distance-to-next-unmatched-end program))
           (distance-from-first-to-second-unmatched-end
            (distance-to-next-unmatched-end
  