9_Recursion
Leap of Faith
- Verify the base case (n=0)
- Treat fact as a functional abstraction (功能抽象)
- Assume fact(n-1) is correct ,verify that fact(n) is correct (数学归纳法)
- When approaching or debugging recursive functions, you should avoid visualizing them in this way for large or complicated inputs, since the large number of frames can be quite unwieldy and confusing.