4 ms·
It should be: def tail_factorial(n, accumulator=1): if n == 0: return accumulator else: return tail_factorial(n-1, accumulator * n)
by msuvakov 9y ago
It should be:
def tail_factorial(n, accumulator=1):
if n == 0: return accumulator
else: return tail_factorial(n-1, accumulator * n)