Email or username:

Password:

Forgot your password?
Top-level
Andrew Tropin

@wingo Thank you, I'll take a look!

ATM I worked around it like this:

(begin
(define (my-call/cc f)
(shift k (k (f k))))

(define (my-eval exp)
(reset
(primitive-eval exp)))

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

But don't know how good this idea is :)

I have another plan on how to improve the evaluation thread implementation, so call/cc doesn't break the value returning and interruption mechanisms.

1 comment
Andrew Tropin

@wingo It seems to preserve the semantics of call/cc, but probably there are some shortcomings in this implementation.

P.S. Oops, it doesn't preserve the semantics.

Go Up