(define (make-ring n) (define (make-list n result) (if (= n 0) (cons 0 result) (make-list (-1+ n) (cons n result)))) (let* ((last-cel (list (-1+ n))) (first-cel (make-list (- n 2) last-cel))) (set-cdr! last-cel first-cel))) (define (show-ring r) (display (car r)) (display " ") (show-ring (cdr r)))