Image Credit: by zari 906
So you remember inception and the dream within the dream within the dream and ooooh Leonardo di Caprio. Got distracted, sorry.
Well in programming (and math), there’s the nightmare within the nightmare within the nightmare. Also known as… recursion. Just typing the word makes me shudder although let me tell you, I am doing my best to tame this beast.
So if I got this well…. Recursion = calling a function inside itself until the certain conditions (base case) are met. There’s also a termination condition, in case your input is really off its rocker. It’s supposed to keep your program from going all Nyan cat on you, in infinity and beyond.
Anyway, recursion… It’s my first real programming pet-peeve, if you don’t count OOP, which I just forget. The information just slides out of my ear and drowns into a puddle before I can do anything about it.
Stop ranting, it’s time to go beat up recursion. Oh yes.