On Sat, Oct 15, 2022 at 10:41 PM Marc Nieper-Wißkirchen < marc.nie...@gmail.com> wrote:
> Am So., 16. Okt. 2022 um 01:26 Uhr schrieb Shiro Kawai < > shiro.ka...@gmail.com>: > > The sample implementation does it by not gluing the last activation > record and the last set of marks to a continuation frame. This only > happens, conceptually, for older frames. > > In the example below, CONT conceptually contains the latest frame > without the continuation mark attached. Inside the evaluation of > `with-continuation-marks`, the current continuation has changed, > namely its latest frame has been replaced by one with a mark attached. > I see that is how reference implementation works, but is it the only interpretation of the spec? Notably, the behavior of with-continuation-marks replacing the latest frame is derived from the current spec? Probably I was not understanding "dynamically annotated" correctly. Does it mean that the annotation of the latest frame is effective within the dynamic extent of with-continuation-marks? > > > > > > > > > On Sat, Oct 15, 2022 at 12:22 PM Marc Nieper-Wißkirchen < > marc.nie...@gmail.com> wrote: > >> > >> Am Sa., 15. Okt. 2022 um 13:25 Uhr schrieb Shiro Kawai < > shiro.ka...@gmail.com>: > >> > > >> > Just to be sure. In the following code, the returned mark set > contains the key-value pair {key, mark1} but not {key, mark2}, correct? > >> > >> Continuation marks are attached without mutation like when you cons to > a list. > >> > >> In the example below, CONT captured by call/cc does not include any of > >> the marks set by the code so the returned mark set neither contains > >> any key-value pair of the two. > >> > >> > > >> > === > >> > (let ((marks #f)) > >> > (call/cc > >> > (lambda (cont) > >> > (with-continuation-marks 'key 'mark1 > >> > (begin > >> > (set! marks (continuation-marks cont)) > >> > (with-continuation-marks 'key 'mark2 #f))))) > >> > marks) > >> > === > >> > > >> > >