I have this tail recursive function here:
def recursive_function(n, sum): if n < 1: return sum else: return recursive_function(n-1
Use a language that guarantees tail-call optimisation. Or use iteration. Alternatively, get cute with decorators.