0
Can you predict recursion easier?
I was just wondering whether there is an easier way to work out what recursion (self-referencing in functions) is going to output. The reason for me asking this is because I found predicting it really tricky in Area 6 Lesson 6. Or is the only way to write it out step by step?
1 ответ
+ 3
1. Look at the else condition: What is the first result?
2. Look at the exit condition: What does it return?
3. Look at the else condition again: What are the intermediary steps?