Re: continuation? not needed (in R7RS)
Artyom Bologov 25 Sep 2026 02:21 UTC
Peter,
> Now, some implementations *do* add operations that are done
> specifically on continuations. The two types I know about are
>
> * Marc Feeley's continuation API, seen in (chicken continuation) [1]
> and in Gambit. These are not procedure objects, so (continuation?
> (call/cc (lambda (x) x))) returns false.
> * SRFI 226 [2]. In that SRFI, continuations are procedures.
>
> This is to support operations such as
> continuation-graft/call-in-continuation.
Add TinyScheme to that list, though it’s not a proper R7RS
implementation (yet.) It has a distinct continuation type, at the very
least.
But I did re-read the spec
https://standards.scheme.org/r7rs-html5/index.html#call-with-current-continuation
and the language is pretty clear:
> The procedure call-with-current-continuation (or its equivalent
> abbreviation call/cc) packages the current continuation (see the
> rationale below) as an “escape procedure” and passes it as an argument
> to proc. The escape procedure is a Scheme procedure that, if it is
> later called, will abandon whatever continuation is in effect at that
> later time and will instead use the continuation that was in effect
> when the escape procedure was created.
It is indeed just a procedure that call/cc passes into its argument, and
not the continuation itself.
Alright, continuation? is safe to remove too. Will not be there in the
next draft!
Best of luck,
--
Artyom Bologov
https://aartaka.me