(use-modules (ice-9 control)) ;; (use shift-reset) (let ((captured-k (reset (display (shift f f))))) (display (string-append "str: '" (with-output-to-string (lambda () (captured-k "this should go to the string"))) "'"))) ;; $ csi -qbn tesu.rkt ;; this should go to the stringstr: '' ;; $ guile tesu.rkt ;; str: 'this should go to the string'