Are there guarantees on which Scheme procedures do *not* capture continuations? Bradley Lucier (21 Sep 2023 17:36 UTC)

Are there guarantees on which Scheme procedures do *not* capture continuations? Bradley Lucier 21 Sep 2023 17:36 UTC

In the sample implementation, I thought of having a flag in an array A
that says whether, e.g., (array-copy A) and (array-copy! A) would always
have the same effect.

This will be true if it is known that (array-getter A) never captures
its continuation for later invocation.

In the sample implementation, this is true for specialized arrays by
construction.

If we know that (array-getter A) never captures its continuation and,
e.g., square doesn't capture its continuation, then if B

(array-map square A)

it would be safe to replace (array-copy B) with (array-copy! B).

Hence the question in the subject line:

Are there guarantees on which Scheme procedures do *not* capture
continuations?

Brad