The accumulator needs to be returned by the tail-recursive functions otherwise they won’t work correctly.
1 Like
The accumulator needs to be returned by the tail-recursive functions otherwise they won’t work correctly.