What is Nostr?
Andrew Tropin /
npub1dg6…vtnu
2023-10-12 05:01:15

Andrew Tropin on Nostr: How to delimit an undelimited continuation? I want something like this to work ...

How to delimit an undelimited continuation?

I want something like this to work without going into infinite loop (I don't want call/cc to capture context outside of quoted code):

(begin
(define (my-eval exp)
"Maybe some other eval implementation here?"
(primitive-eval exp))

(my-eval `(define kont #f))
(my-eval `(+ 1 (call/cc (lambda (k) (set! kont k) 5))))
(my-eval `(kont 41)))

#guile #scheme #lisp
Author Public Key
npub1dg643nc4ummjgwp77gxrsht940u274xj977hl8r43ldxrgyr2lks32vtnu