The solution is relatively simple : because these tail - recursive functions are really just easier ways of writing loops , have the compiler automatically transform them to loops 解决方案比较简单:因为尾递归函数实际上只是编写循环的一种更简单的方式,所以就让编译器把它们自动转换成循环形式。
Because of this attribute , there is a nice correspondence between tail - recursive functions and loops : each recursive call can be thought of simply as one more iteration through a loop 由于这一特点,在尾递归函数和循环之间有一个很好的对应关系:可以简单地把每个递归调用看作是一个循环的多次迭代。