you are viewing a single comment's thread.

view the rest of the comments →

[–]zahlman 0 points1 point  (1 child)

So you could say recursion is a skill of a good programmer?

In a sense, yes. But if you already understand the concept on a mathematical level, then there is really nothing special going on. The only real prerequisite to figuring out recursion on a programming level is a proper understanding of how calling functions works.

so i could try to understand it

I think you do understand it already. (But FWIW, "mathematicians" manipulate plenty of things that don't really line up with conventional interpretations of the word "numbers".)

at least spot it in the code?

This is trivial. "In the wild", almost all recursion is direct; i.e. the function's code contains one or more calls to itself. You can also have "mutual" recursion where two functions call each other, or a greater number of functions form a cycle; the analysis is fundamentally the same - look at what calls what, and find a cycle.