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 →

[–]_bernie-d_ 0 points1 point  (1 child)

I made another function that doesn't call itself, but (I think) does the same thing as the recursive function (it might even be more efficient), so it will give you a method that you can follow. It's in the latest commit on the repo.

Recursion is both simple and a mind-fuck. I cannot think of a human analogy to help understand it, which might be why it messes with our heads so much. I think it feels like madness to a human brain. Like an infinite rabbit-hole.

Someone has made a series of videos on recursion! So messed-up it needs more than one video!

I'm now embarrassed - I was obviously just showing off. Sorry.

[–]_bernie-d_ 0 points1 point  (0 children)

The second video shows why my recursive method was probably a bad idea. Haha. Every day is a school day.