Racket code to find missing ranges
Your solution seems to me quite complex, with iterations, recursions, and the use of match.
Here is an alternative version with a simple linear recursion, where the result is given with lists and not with strings.
(define (missing-ranges nums lower upper)
  (cond ((&gt; lower upper) '())
        ((null? nums) (list (list lower upper)))
        ((= lower (car nums)) (missing-ranges (cdr nums) (+ lower 1) upper))
        ((= (car nums) (+ 1 lower)) (cons (list lower) (missing-ranges nums (+ lower 1) upper)))
        (else (cons (list lower (- (car nums) 1)) (missing-ranges (cdr nums) (+ (car nums) 1) upper)))))

(missing-ranges '(0 1 3 50 75) 0 99)
'((2) (4 49) (51 74) (76 99))

(missing-ranges '(8) 0 99)
'((0 7) (9 99))

(missing-ranges '() 0 99)
'((0 99))

(missing-ranges '(3 9 88 99) 0 99)
'((0 2) (4 8) (10 87) (89 98))

(missing-ranges '(0 99) 0 99)
'((1 98))

(missing-ranges '(1 2 3) 1 3)
'()