3 ms·
Wouldn't any scheme runtime/compiler need to handle that, though? In other words, wouldn't a transform to a loop (on the js side) be one possible approach?
by e12e 10y ago
Wouldn't any scheme runtime/compiler need to handle that, though? In other words, wouldn't a transform to a loop (on the js side) be one possible approach?
- ufo 10y agoOnly if you know at compilation time what function(s) you will be calling in a tail recursive manner. If the function you call comes from a parameter or variable (for example, in continuation passing style code) then there is no straightforward way to compile it into a loop.