|
(define-syntax-parse-rule (probe flo) |
|
(call/cc |
|
(λ (return) |
|
(source return) ; save the continuation to the `source` parameter |
|
flo))) |
|
|
|
(define-qi-syntax-parser readout |
|
[_:id #'(esc |
|
(λ args |
|
(let ([src (source)]) |
|
;; reset source to avoid the possibility of stale |
|
;; continuations used later outside of a `probe` |
|
(source default-source) |
|
(apply src args))))]) |
It might obviate the need for (source default-source), but does the parameterize belong around call/cc or within it? What happens in the presence of a threading (as in thread) backend? Etc.