On Tue 21 Jun 2016 17:31, David Kastrup <d...@gnu.org> writes: > Andy Wingo <wi...@pobox.com> writes: > >> I think on 2.0 that this might be an OK workaround: >> >> (define (reduce-right f ridentity lst) >> (reduce f ridentity (reverse lst))) > > So if we don't store the inverse list in-space, it needs to be either a > copy in heap (reverse) or stack (recursion). Stack allocation is likely > cheaper in execution time (though the total memory cost depends on the > stack frame size taken per call). The limited stack size on 2.0 does > not seem like a good fit, however. Which makes your workaround seem > like the best option.
Applied this fix to stable-2.0. Thanks for the report. Andy