Re:Primitive Recursive Functions for a Working Programmer
by yorwba on Sunday August 04, 2024 @07:16AM
(#41152747)
> a function that runs in constant stack space, yet it hangs
I don't think it actually runs in constant stack space, but it takes an exponential number of execution steps to get to any given stack depth, as the number of function arguments that need to be unraveled doubles with every invocation of f.
I don't think it actually runs in constant stack space, but it takes an exponential number of execution steps to get to any given stack depth, as the number of function arguments that need to be unraveled doubles with every invocation of f.