I have never met someone who took a year to understand recursion.
I probably took much more, but that’s because I first heard about the concept (in Karel) when I was 10 years old. I kinda-understood the most simple implementation, but anything beyond that was too abstract for me. Then I didn’t need the concept for a few years. And then, maybe five years later, I finally understood it, but it still felt uncomfortable.
These days it feels obvious, and I guess the trick is that before I start writing the code, I write down an exact specification of what the function does—and that makes it easy to decide when calling the function with a smaller parameter is the right thing to do, and when something extra needs to be done. (Plus now I also think about tail recursion, which is usually the right thing to do.)
I probably took much more, but that’s because I first heard about the concept (in Karel) when I was 10 years old. I kinda-understood the most simple implementation, but anything beyond that was too abstract for me. Then I didn’t need the concept for a few years. And then, maybe five years later, I finally understood it, but it still felt uncomfortable.
These days it feels obvious, and I guess the trick is that before I start writing the code, I write down an exact specification of what the function does—and that makes it easy to decide when calling the function with a smaller parameter is the right thing to do, and when something extra needs to be done. (Plus now I also think about tail recursion, which is usually the right thing to do.)
General intelligence is still increasing at 10 years old. Simply getting older is sufficient to explain your experience.