#lang scheme/base (require "../../main.ss") (define (ccm key) (continuation-mark-set->list (current-continuation-marks) key)) ;; tail recursive (define t1 (equal? (let f ([n 10]) (let/tc return (if (zero? n) (ccm 'test) (return (with-continuation-mark 'test n (f (sub1 n))))))) '(1))) ;; not tail recursive (define t2 (equal? (let f ([n 10]) (let/tc return (if (zero? n) (ccm 'test) (return (with-continuation-mark 'test n (values (f (sub1 n)))))))) '(1 2 3 4 5 6 7 8 9 10))) (and t1 t2)