Blob
1 (define (test-case actual expected)2 (newline)3 (display "Actual: ")4 (display actual)5 (newline)6 (display "Expected: ")7 (display expected)8 (newline))10 (define (last-pair x)11 (if (null? (cdr x))12 x13 (last-pair (cdr x))))15 (define (make-cycle x)16 (set-cdr! (last-pair x) x)17 x)19 (define z (make-cycle (list 'a 'b 'c)))21 ;; What happens if we try to compute (last-pair z)?23 ;; infinite loop