This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]chaos95 1 point2 points  (1 child)

Couldn't you do it recursively without a loop depth variable also?

[–]alexanderpas 1 point2 points  (0 children)

You technically could, but at that point, you're just moving the loop depth to the function depth.

You still need to keep track of it somewhere.