Does continuation marks take a snapshot? Shiro Kawai (15 Oct 2022 11:25 UTC)
Re: Does continuation marks take a snapshot? Marc Nieper-Wißkirchen (15 Oct 2022 22:22 UTC)
Re: Does continuation marks take a snapshot? Shiro Kawai (15 Oct 2022 23:26 UTC)
Re: Does continuation marks take a snapshot? Marc Nieper-Wißkirchen (16 Oct 2022 08:41 UTC)
Re: Does continuation marks take a snapshot? Shiro Kawai (16 Oct 2022 10:35 UTC)
Re: Does continuation marks take a snapshot? Marc Nieper-Wißkirchen (17 Oct 2022 05:59 UTC)
Re: Does continuation marks take a snapshot? Shiro Kawai (19 Oct 2022 07:02 UTC)
Re: Does continuation marks take a snapshot? Shiro Kawai (28 Oct 2022 17:14 UTC)
Re: Does continuation marks take a snapshot? Marc Nieper-Wißkirchen (28 Oct 2022 17:47 UTC)

Re: Does continuation marks take a snapshot? Marc Nieper-Wißkirchen 15 Oct 2022 22:22 UTC

Am Sa., 15. Okt. 2022 um 13:25 Uhr schrieb Shiro Kawai <xxxxxx@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)
> ===
>
>