(define (make-queue)
  (define rear #f)
  (define first #f)
  (define (enqueue el)
    (if (not first)
        (begin
          (set! rear (list el))
          (set! first rear))
        (begin
          (set-cdr! rear (list el))
          (set! rear (cdr rear))))
    #t)
  (define (dequeue)
    (if (not first)
        #f
        (let ((result (car first)))
          (set! first (cdr first))
          result)))
  (define (show)
    (display first)
    (newline))
  (define (queue mesg)
    (cond ((eq? mesg 'enqueue) enqueue)
          ((eq? mesg 'dequeue) dequeue)
          ((eq? mesg 'display) show)
          (else (error "Queue--, unkown message"))))
  queue)
(define (demo)
  (define Q (make-queue))
  (define (first-five)
    (do ((nogtedoen 5 (-1+ nogtedoen)))
      ((= nogtedoen 0) #t)
      (display ((Q 'dequeue)))))
  (do ((pos 1 (1+ pos)))
    ((= pos 11) #t)
    ((Q 'enqueue) pos))
  ((Q 'display))
  (first-five)
  ((Q 'display))
  (first-five))

de syntax van do :
  (do ((<naam> <init> <step>)
       (...    ...    ...   )
       (...    ...    ...   ))
    ((<stop-cond>) <resultaat>)
    <body>)