[racket] Mutable state vs RAM on fire

From: Stephen Bloch (bloch at adelphi.edu)
Date: Thu May 3 10:34:43 EDT 2012

On May 3, 2012, at 7:45 AM, Rüdiger Asche <rac at ruediger-asche.de> wrote:

> uhm... am I mistaken, or is there one recursive call to fast-expt in a non tail recursive position?

Yes, there is.

> Schouldn't that be unwound?

Assuming you want correct answers :-) , it can't be unless you start adding extra parameters to fast-expt, making it harder to understand.  And, as somebody else pointed out, the recursion depth is only log_2(n) so it's really not a concern.

Stephen Bloch
sbloch at adelphi.edu
> 


Posted on the users mailing list.