3 ms·
Well, from the perspective of a student, I think it's usually not worth doing things the way your instructor explicitly does not want them done. Sometimes you m
by tjr 4y ago
Well, from the perspective of a student, I think it's usually not worth doing things the way your instructor explicitly does not want them done. Sometimes you might have some overarching moral point to make, and it's worth the repercussions in your grade, but if it were me in this case, I would just avoid recursion for this class. :-)
More generally, you might look into the benefits of tail call optimization, especially in Scheme.