<div dir="ltr"><div>For some reason the below program returns false:<br><br>#lang racket</div><div>(define g #f)</div><div>(define p (make-continuation-prompt-tag))</div><div>(define (t)</div><div>  (let ([a (cons 1 2)])</div>
<div>    (call-with-composable-continuation (ë (k) (set! g k)) p)</div><div>    a))</div><div>(call-with-continuation-prompt t p)</div><div>(eq? (call-with-continuation-prompt g p)</div><div>       (call-with-continuation-prompt g p))<br>
<br>This happens with call/cc as well. From my understanding a should be allocated before the continuation is captured, so the two calls to g should return the same cell. If I remove the prompt tag the program returns true.<br>
<br>Anyone have any clue whats going on or how to fix?<br><br>--Spencer</div></div>