Here is a solution to 3.22

(define (make-queue)
  (let ((front-ptr '())
        (rear-ptr '()))
    (define (empty-queue?)
      (and (null? front-ptr) (null? rear-ptr)))
    (define (set-front-ptr! pair)
      (set! front-ptr pair))
    (define (set-rear-ptr! pair)
      (set! rear-ptr pair))
    (define (insert! item)
      (let ((new-pair (list item)))
        (cond ((empty-queue?)
               (set-front-ptr! new-pair)
               (set-rear-ptr! new-pair))
               (set-cdr! rear-ptr new-pair)
               (set-rear-ptr! new-pair)))))
    (define (delete!)
      (cond ((empty-queue?) (error "Empty queue!"))
            (else (let ((item (car front-ptr)))
                    (set-front-ptr! (cdr front-ptr))
                    (if (null? front-ptr) (set-rear-ptr! '()))
    (define (peek)
      (if (empty-queue?) 
          (error "Empty queue!")
          (car front-ptr)))
    (define (show)
      (show-helper front-ptr))
    (define (show-helper list)
      (cond ((null? list) '())
            (else (cons (car list) (show-helper (cdr list))))))
    (define (dispatch m)
      (cond ((eq? m 'insert!) insert!)
            ((eq? m 'delete!) delete!)
            ((eq? m 'peek) peek)    ; peek and show added for testing
            ((eq? m 'show) show)))  ; convenience