[racket] call/comp, eq? and call-with-continuation-prompt
On a lovely side note, asumu fixed this small case by changing (set! g k)
=> (set! g (lambda () a (k))).
However when I plugged that into the larger program I distilled this
example from, `eq?' still returns #f.
On Mon, Mar 10, 2014 at 10:07 PM, Matthias Felleisen
<matthias at ccs.neu.edu>wrote:
>
> Baffled, too.
>
>
> On Mar 10, 2014, at 9:44 PM, Spencer Florence wrote:
>
> > For some reason the below program returns false:
> >
> > #lang racket
> > (define g #f)
> > (define p (make-continuation-prompt-tag))
> > (define (t)
> > (let ([a (cons 1 2)])
> > (call-with-composable-continuation (λ (k) (set! g k)) p)
> > a))
> > (call-with-continuation-prompt t p)
> > (eq? (call-with-continuation-prompt g p)
> > (call-with-continuation-prompt g p))
> >
> > 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.
> >
> > Anyone have any clue whats going on or how to fix?
> >
> > --Spencer
> > ____________________
> > Racket Users list:
> > http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140310/f007880d/attachment.html>