Thanks. That's the reasonable behavior, though one might overlook it when implementing naively.
On Fri, Oct 28, 2022 at 11:02 AM Marc Nieper-Wißkirchen < marc.nie...@gmail.com> wrote: > Am Fr., 28. Okt. 2022 um 22:55 Uhr schrieb Shiro Kawai < > shiro.ka...@gmail.com>: > > > > I assume the same applies to the parameterization, that is, the > following should run in a constant space. Correct? > > > > (define p (make-parameter 0)) > > (let loop () > > (parameterize ((p 1)) > > (loop))) > > Yes, this is the expectation (and a reason why parameterize possesses > a tail-context guarantee. The idea is that a parameter is > conceptually the same as an implicit argument. An a loop like > > (let loop ((p 0)) > (loop 1)) > > also runs in bounded space. > > I should check whether the sample implementation is correct in this regard. >