New paste Repaste Download
(define yield (make-prompt-tag 'yield))
(call-with-prompt yield
  (λ ()
    (let iter ([lst (list 1)])
      (case
        [(null? lst) *unspecified*]
        [else
          (abort-to-prompt yield (car lst))
          (iter (cdr lst))])))
  (λ (k x)
     (simple-format #t "a) iterator yielded: ~a\n" x)
     (k)))
Filename: yield.scm. Size: 328b. View raw, , hex, or download this file.

This paste expires on 2025-07-23 21:34:56.096127. Pasted through web.