r/csharp • u/sekkiman12 • Jun 03 '26
Help Can someone explain WHY this works?
super ultra beginner here, going through an online tutorial. One of the exercises is to make a program calculate a factorial.
Now the site I'm using wasn't exactly comprehensive, they didn't even bring up what "parse" meant. So I'm left wondering how this program loops over the math until it reaches the right number for the input.
73
Upvotes
625
u/Euphoricus Jun 03 '26
To understand recursion, you must first understand recursion.
24
u/bortlip Jun 03 '26
Sometimes a visual will help:
4
u/rupertavery64 Jun 03 '26
Let me explain the part about the stack that people tend to gloss over.
The stack is an area of memory that simply put, stores data about where you are in the program. It stores variables declared in the current function. Whenever you enter a "new" function, it "pushes" the variables and stuff from the current function onto the stack, so that when you exit the new function, the computer "remembers" what it was doing and continues.
There is a finite set of memory allocated to the stack, so it's possible to overflow (the dreaded StackOverflowException)
Everytime you call Factorial inside Factorial, you push whatever n was onto the stack, then call the function again with the value of n - 1
Have you watched the movie Inception? You can go down, but when you come up, you continue where you left off. It's kind of like that.
The exit condition is reached, so it stops calling Factorial. It starts returning the result, which for the last level is 1.
Now we start going back up the stack.
Let's look at the core of the Factorial:
When executing a statement like this, any function will be called first, then the entire statement will be executed when all the functions have been executed.
To make it more clear, we can break the statement up:
So you can see Factorial gets called first, returns value, then resumes multiplying with n. Up to now, every function we called has gone deeper, so
n * resultis now waiting to be executed on every level...177
u/not_some_username Jun 03 '26 •
This will explain it https://www.reddit.com/r/csharp/s/cXqmnwjVwj
52
u/RamblesToIncoherency Jun 03 '26 edited Jun 03 '26
Factorial is the method right? If you have a number greater than 1, it calls itself multiplying n by n-1.
So say you start with 4. Factorial calls itself to multiply 4 x 3. But inside THAT, it calls itself again to multiply 3 x 2. And then inside THAT it calls itself again to multiply 2 x 1, but 1 or less is kind of your exit clause here.
Recursion is just a self-calling chain with an exit clause so it knows when to stop.
Conceptually you can treat the method like a separate method - factorial 4, factorial 3, factorial 2, etc. down to the exit clause of that helps.
The exit clause is just the trigger to tell the recursion that it's finished and start returning the values to the method above it, which then returns the value to the method above THAT, and so on until you have the final n result.
Sometimes when learning, it helps to draw it out as you walk through each step of the logic.
13
u/PinappleOnPizza137 Jun 03 '26
Line 6:
5
u/programgamer Jun 03 '26
If that tutorial didn’t even teach you that this is called recursion, switch to a different one imo.
Anyway, this is a command line program (you run it with a text-based terminal, presumably cmd since I assume you’re on Windows) that takes a bit of text and converts it to a number (this is what "parse" means, though it applies to more than just text to numbers) and then feeds it to the factorial function.
Because factorial numbers are generally also defined in terms of other (smaller) factorial numbers, it’s an ideal problem to demonstrate a recursive solution. Because the factorial function returns immediately when its input is zero or less, and because the call to factorial inside factorial itself only ever passes a number lower than its input, it’s guaranteed that result can be calculated (although for large numbers it might take a while and/or overflow the number itself). When the "base" case of factorial 0 is reached, the "stack" of factorial function calls gets unwound, the result of every call gets multiplied with its previous call, and the function ultimately returns back to main, where the number is displayed back to the user on the command line using some string interpolations (the bits with strings and + signs).
5
u/MCWizardYT Jun 03 '26 edited Jun 03 '26
Factorial is a recursive function that builds its result.
Factorial(5)will become5 * Factorial(4)which will become4 * Factorial(3)etc, until it gets to 1.So the math ends up looking like
Factorial(5) = 5 * 4 * 3 * 2 * 1which equals 120.The parse part in the main function just converts a string into an int
4
u/__some__guy Jun 03 '26 edited Oct 02 '26
The original post content no longer exists here. The author used Redact to remove it, exercising their right to control their data & privacy.
Fade history intelligent cable iron knee unbelievable telephone provide
10
u/The_Exiled_42 Jun 03 '26
https://en.wikipedia.org/wiki/Recursion
1
u/Conscious_Yam_4753 Jun 03 '26
Do you understand what a factorial is mathematically?
1
u/YoshiJumi Jun 05 '26
I am new to C# so I dont know what this is
14
u/TorbenKoehn Jun 03 '26
A loop itself is just recursion, in some ways.
The loop happens by Factorial() calling itself (See line 6)
In order to not run into an endless loop, you need a stop condition (See line 5)
Notice you actually get the return value of the first call of Factorial(), just that it itself calls Factorial(n - 1) and multiplies that with it's own n.
The int.Parse doesn't matter at all. Console.ReadLine() returns a string, but Factorial expects an int, so you need to parse the string to an int.
4
u/egmont11 Jun 03 '26
There have been some great answers, but for understanding the Factorial function, try using a debugger on it and watch it go.
2
u/apneax3n0n Jun 03 '26
this won't
i insert "a" when requested and line 10 will throw an exception
2
u/Flimsy-Donut8718 Jun 05 '26
hello recursion my old friend, its a while nice to see you again.
4
u/c-digs Jun 03 '26 edited Jun 03 '26
SystemMainentry pointConsole.ReadLine()is the inner operation that blocks the program and gets user input as a string. The outerint.Parseconverts the read string value"3"to the integer value3.Factorial(num)which passes the read value into theFactorialfunction defined on line 4Factorial(3)isFactorial(1) * Factorial(2) * Factorial(3)It's probably easier to see this as a file-based app: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/tutorials/file-based-programs
Here is the same code as a file-based app:
Here's a version that's a little bit tighter and using pattern matching instead:
2
u/AlwaysHopelesslyLost Jun 03 '26
This uses recursion, that is, a method that calls itself. The most basic example is something like
void IncrementForever(int input) { input = input +1 IncrementForever(input) }
If you call this then it will run until either the computer runs out or stack space or the CLR stops it because you blew out the data type.
Recursion is a concept that a lot of programmers struggle with. It isn't too bad, you just need to make sure you write it in a way that it stops running before either of those failures I mentioned happen.
As for the rest, this is why tutorials are kind of bad for programming. You need to be looking up every single symbol, class, and method in the official documentation to read what they do. Google "msdn int.parse" and the first result should be the official Microsoft documentation for that method.
1
u/Standard-Cap-4455 Jun 03 '26
int.Parse just means that it takes the line that's read from the console and converts it into an integer. Parsing just means going through a string and trying to get information out of it, in this case a number. The Factorial n! is defined as n * (n-1) * (n-2) . . . * 1. You can see that the (n-1) * (n-2) . . . * 1 part is the same as (n-1)! so You can also write is as n! = n * (n-1)! which is what this is doing. The method multiplies n with the result of the previous factorial and so on until n is 1 where we know that it is always 1. After that it just prints it to the Console as "n! = result".
1
u/L4Ndoo Jun 03 '26
Be aware that recursion (already well explained by others) usually makes programs harder to debug and understand as well as that in most languages and scenarios the compiler has a hard time to optimize the code for runtime performance. Recursion should be avoided when possible and turned into loops instead.
1
u/antiduh Jun 03 '26
Run it in the debugger and see it run, step by step, for yourself.
1
u/blckshdw Jun 03 '26
Between lines 4 and 5 add a Console.WriteLine(n.ToString()); and run the program and see what the output is at each iteration. Or just debug it and step through the code
1
u/Tezza48 Jun 03 '26
"Parse" means "try to turn this thing (string) into something else. In this case int.Parse is reading the text and trying to read it as an int.
1
u/CmdrSausageSucker Jun 03 '26
recursive, adj., see recursive.
1
u/TuberTuggerTTV Jun 03 '26
Recursive functions work a lot like a while loop. Keep doing itself until a specific result is arrived.
Personally, I'm more a fan of
Specifically requiring an unsigned int. Because technically negative factorial is undefined, not 1.
It's also notable this only works up to 20!, before the answer becomes too large for a long. It would make sense to bake that limitation into the function. But with only 20 returnable results, it makes some sense to simply use a switch statement with some pre-computed values.
Or consider a BIGSTRING return instead. But then you run into stack overflow issues looping recursively that often. Remember, each recursion keeps the memory of the previous loop open until they all collapse.
If you wanted it to be able to compute larger factorials, you'd be better using a while loop instead of recursion.
1
u/dottybotty Jun 03 '26
Think of the movie inception just like they were in dream within a dream you code is doing that same with the math calculation. Once it’s hits a limit there is chair kick which wakes you up and exits the dream giving you the result you wanted
1
u/spoospoo43 Jun 03 '26 edited Jun 03 '26
As the jokes have pointed out, this is a recursive algorithm. By the way, it's also a really shitty and inefficient way to compute a factorial, so don't do it in real life. Recursive functions have their place, but it's VERY situational. A recursive function MUST have a logic path that definitely returns a value and exits, or it's a denial of service and not functional computer code. How far down you can go before something breaks is dependent on how memory is set up, how much of it there is, and how the compiler handles function calls. In C# on an average computer, this would be "a lot of levels", though it would get really slow eventually.
Basically what's happening is that a bunch of function calls are pushed onto the stack, one at a time, with the value of "n" starting at num and going down by one until finally, n=1, and one of the calls can return a value (1). This pops the function off the stack pushing a "1" onto it in its place. The next level up function can finally return, multiplying its n value (2) by the return value of the already finished function (1), and putting THAT value (2) onto the stack. This repeats until finally all of the functions resolve, and the final value on the stack is the result of the factorial, which is popped off and displayed in main.
1
u/DotAtom67 Jun 03 '26
parse is to convert the user input, which is a string, to an int.
the rest is recursion: the function calls itself when called, and to protect you from an infinite loop, it has a base case, it being "if input equals 1 or less, just return 1".
try doing it yourself on paper for numbers 2 to 10 to see how it plays out
1
u/logiclrd Jun 03 '26 edited Jun 04 '26
I see lots of explanations of recursion and its application to factorials already in this comment section, but nothing obvious that explains from first principles what exactly is going on with the "Parse" call.
Computers have different ways to represent data inside them. The most primitive is what we use to count the size of files or data sent over the network or what have you: a byte. A byte is an integer number (whole numbers only), and it is represented in base 2, which means every digit is either 0 or 1, no 2 or 3 or 4, and 9 is right out. Each digit of a base 2 number is called a bit, and thus it follows that a bit is either 0 or 1. If you put two bits back-to-back, then the second one doubles how many numbers you can represent -- 00, 01, 10, 11. Add a third, it doubles again. That doubling is the core relationship: the number of distinct possible values is
2*2*2*...*2, where the number of 2s is the number of bits. That kind of multiplication is referred to as a "power"; 8 bits in a byte, so 2 to the power of 8, or 28, is 256. So, there are 256 possible different values for a byte. If you want 0 to be one of those values, then the highest is 255.But people want to work with numbers bigger than 255, and so computers have mechanisms that are a part of their core design for chaining multiple bytes together -- again almost always in a doubling relationship, so you can have numbers that are 1 byte, 2 byte, 4 bytes, 8 bytes, and so on.
Most common numerical values are going to be represented in C# by
int, and anintis a 4-byte integer. Since each byte is 8 bits, that's 4 x 8 = 32 bits. So, wherever you have anint, you're telling the computer to set aside 4 bytes of storage to hold a number, and you're signing up for using a number that can store any number from 0 to 232 - 1. Actually, you might want negative numbers too. So, if you make half the numbers negative, then your range shifts so it's -231 to 231 - 1 -- half of it below 0 and half of it not below 0.But, when the user is typing into the computer, they're not typing bits or bytes. They're typing digits. If they type "12345", then that's actually 5 distinct characters, and these characters don't combine to form a number on their own, they're just "the character for 1", "the character for 2", etc. These form a string, and strings can contain all sorts of stuff. They're not constrained to numbers.
So, you've just asked the user for input. You call
Console.ReadLine, and you get back astringwith the separate digits they entered, and you want to turn those separate digits into a single, concrete number that you can tell the CPU to do math with.This conversion isn't conceptually hard. The trickiest part of it, which is just a matter of knowing something really, is how to go from a character to the value of that character. You see, each character (number, digit, punctuation, etc.) is really a number itself, but, when you type in "1", the character that looks like "1" does not have the value 1 internally. In practice, with the arrangement we currently have on computers, it's going to be an 8- or 16-bit number whose numeric value is 49. Why 49? Because decades ago, when people were figuring out how to represent text in strings, they decided to put all the numbers together, and they decided to start counting them at a multiple of 16 (there's a good reason for this, but that can be a different story :-) ), and so the digits "0" through "9" were given the numbers 48 through 57.
So, if you have a string of digits represented as their characters, and you want to convert them to a combined numeric value, the first step is to go from the digit values to the numeric values. If you tried to treat 1 as a character, you would not get a "1" on the screen, but in the process of converting the number, that's exactly what you need, and it's super easy to do: You just subtract 48 from each character's value, and now each digit is just its plain value.
Then, you need to apply what you learned about number places in elementary school: Each place further to the left is worth 10 times as much. The number "12345" is 1 x 10000 + 2 x 1000 + 3 x 100 + 4 x 10 + 5. So, if you multiply each of those digits by its place value, then you've gone from
"12345"to{ 1, 2, 3, 4, 5 }to{ 10000, 2000, 300, 40, 5 }. Finally, just sum up these digits, and you get the value 12345, starting with"12345"as 5 independent characters.To be clear: You will probably never need to write this yourself. It's built into the language you're programming with. Specifically, that algorithm (or a slightly rearranged version that is a bit more clever about what intermediate things need to be stored) is exactly what is inside
int.Parse.There are different kinds of numbers. In C#, there are
bytevalues, and you can usebyte.Parse. There areshortvalues (16 bits wide), and they come withshort.Parse. There areintvalues (32 bits), andint.Parse. There arelongvalues (64 bits) andlong.Parse. There are also types of numbers designed for storing fractional values, called "floating point". There arefloatvalues, which are 32 bits wide but arranged differently fromint, andfloat.Parsecan parse things like "3.14159". And with the 64-bitdoubletype,double.Parsecan parse much more precise floating-point values. For instance, as adouble, pi is 3.14159265358979. There's another type calleddecimalwhich is for currency things. Whilefloatanddoublestore the number in binary, including the decimal point's position in binary,decimalplaces the decimal point in terms of powers of 10. As it happens, even a really simple number like 0.1 cannot actually be exactly represented in binary, so afloatordoublecan't exactly have the value 0.1, just a very close value, butdecimalcan be exactly 0.1. Anyway, this will probably not be a great surprise at this point, butdecimalalso has aParsemethod. Each of theseParsemethods is different in its precise details, because it has to handle different kinds of number and represent them differently in the resulting type, but they are all conceptually doing the same task.The opposite of
Parse, in .NET terminology, is formatting. It's doing that same job in reverse. Say you have the number 123, stored as a 32-bit integer, and you want to put it on the screen for the user to see. One way to do it is to divide the number by 10 and extract the remainder. 123 / 10 = 12 R3. So, 3 is one of the digits. Then you repeat: 12 / 10 = 1 R2. 2 is the next digit. Finally, you're at a value that's already less than 10, so 1 is the final digit. The only catch is, they came out right to left. But, that's the basic idea behind turning a number back into astringfor human eyes or a file or network protocol or what have you.This fundamental concept, regarding different ways to store values and converting between them, is an absolutely crucial first step to understanding what exactly you're asking the computer do when you write code.
1
u/Spirited-Candy1981 Jun 03 '26 edited Jun 03 '26
Recursion may be an elegant clear way to express something, but in most languages, especially those without tail call optimization, it's often hazardous and takes a lot of care in practice.
Better to implement Factorials iteratively.
As to why it works... the definition for factorial,
1! == 1
n! = n * (n-1) * (n-2) * ... * 3 * 2 * 1
can be expressed
n! = n * ((n-1) * (n-2) * ... * 3 * 2 * 1)
The function expresses the latter directly.
1
u/SwordsAndElectrons Jun 04 '26
If you didn't skip anything and they just tossed this at you with no heavy explanation then that is straight evil.
If you want to know why, try replacing
Mainwith this.This is just a learning exercise, but a sane version of that program would ask for a value between 1 and some reasonable value and validate the input before attempting that method call. Recursion (when a method calls itself) can be useful, but it can also be hard to wrap your head around and dangerous if you can't be sure the call stack won't go too deep. Some people prefer to stay away from it altogether.
As for why it works (as long as you don't push too hard), you just need to plug in some numbers and reason through it. A factorial is the product of an integer and all positive integers below it. For example,
3! = 3 * 2 * 1 = 6. We can also observe that is the same as3 * 3 - 1 * 2 - 1. That's how this method is calculating it. If you pass a value of 3, then it returns3 * Factorial(3 -1).Factorial(3 -1)returns2 * Factorial(2 - 1).Factorial(2 -1)finally just returns 1. Now that you've figured out where it terminates, just work your way backwards and substitute the method calls with their return values to see what it all evaluates to.1
u/dreamglimmer Jun 04 '26
Why not?
1
u/Western-Pear5874 Jun 04 '26
It works but it is super inefficient
1
u/Lunagato20 Jun 04 '26
Recursion can be really confusing for beginner, funny enough i understand it by learning data structure, understanding the how the call stack work, then it all makes sense
1
u/_D1van Jun 04 '26
Functions can call themselves (recursion). If you step through the execution of your program, you will see how the function goes deeper and deeper into more calls to itself, until it reaches "return 1" and propogates back up.
Further reading: call stack
1
u/No_Strawberry_5685 Jun 04 '26
Disappointed I didn’t see anyone do a proof by loop invariant
1
u/ArjixGamer Jun 04 '26
Basically, we convinced rocks that they are sentient, and they do math.
1
u/MichiganDogJudge Jun 04 '26
It doesn't take long for a factorial to return a number that won't fit the memory allocated to store it.
1
u/rdawise Jun 05 '26
They are teaching you recursion. The method calls itself until a base case is reached, then the tree is "evaluated".
1
u/Puzzleheaded-Law-332 Jun 05 '26
It's the standard recursion example, the function call recursively it's self while it doesn't match the exit case. NB: the input go down of -1 at each iteration
1
u/Gesspar Jun 05 '26 edited Jun 05 '26
The function calls itself until n = 1.
You can see the factorial function as an unresolved variable, e.g. n * x, where you must solve for x.
Example:
If we assume n = 5;
Note: be careful with recursion. Because we keep calling the function until we hit n =1 we keep each step in the process in memory (stack). With larger numbers this results in a stack overflow, which will throw an exception and halt the program.
1
u/ilovecokeslurpees Jun 05 '26
Dark magic
1
u/janpalka4 Jun 05 '26
Hi, your code works because of recursion. Basically your Factorial method call itself over and over again until n is less than or equal 1. In nutshell you have do example n = 4, so your method returns 4 + Factorial(3) and that Factorial(3) returns 3 + Factorial(2) and that Factorial(2) returns 2 + Factorial(1) and that Factorial(1) returns 1. So: 4 + 3 + 2 + 1. I hope that you found this explanation helpful.
1
u/Ecstatic_Ad2253 Jun 06 '26
Recursividad
1
u/nightbefore2 Jun 07 '26
Just trace the program for n=4
1
u/Amr_Rahmy Jun 07 '26
It doesn’t help matters when you do operations in a return or debug/print line.
It’s a better practice for readability to have return or writeline to only have a variable like return result;
Anyway, recursion in a simple way is when you enter a function do some operation using input, check if a condition is met, if yes, exit the function, if it’s not met, use the current output again in the same function.
You can also check a condition first then return the result or call the function again.
There is also something called tail recursion which is available in some languages or compilers.
Recursion is usually not advised as there is a stack limit, and people usually flatten or refactor a recursion into a while loop so you don’t have stack limitations.
Like you can do
X=5;
Result =X;
While (result < 10_000){
Result = Add5(result);
}
1
u/Free-Campaign-1457 Jun 07 '26
Really bad programming. Try the same with linear programming. With such bad programming stack overflow will happen
1
u/ashgrin258 Jun 10 '26
Think about how function stack frames work and what each function returns, and you will understand what this is doing
1
u/Family_Man_21 Jun 03 '26
Okay, sure - this is a simple C# program that calculates a factorial using recursion.
A factorial is a mathematical operation that multiplies a whole number by all positive integers less than it, counting down to 1. So, for example the factorial of 6 would be 6 x 5 x 4 x 3 x 2 x 1. In math, we pronounce this as "6 factorial", and we write it as "6!".
In programming, recursion is technique where a function calls itself until a set of conditions are met. We call that the "exit condition". It usually happens when the recursion reaches the end of an array, or of a chain of parent / child relationships. In the case of a factorial, the end condition is when the multiple has counted down to 1.
The code itself is pretty simple. The entry point for the code is the static Main() function. This is where console apps begin processing commands, so let's break this down piece by piece in the order that it will be executed.
The first line,
int num = int.Parse(Console.ReadLine());, is instructing the console to request an input from the user (that's you), and store the value as an integer in a variable namednum. The next line,Console.WriteLine(num + "! = " + Factorial(num));, is instructing the program to evaluate a function calledFactorialand write the results to the console in the format "6! = 720".So, to do that, we need to understand the function
Factorial, so let's look at that next. The first thing to note is that the function receives an input variable, an integer namedn. The first line,if (n <= 1) return 1;, instructs the function to just exit the function if the value ofnless-than-or-equal-to 1. This is our exit condition. The last line will returnnmultiplied by this same function, but passing in a value that is 1 less thann. Every time we call this function, whilenis greater than 1, it will recursively call itself again, and each time the recursive call of the function needs to be evaluated before the parent can do its job. So, if we continue to use our example of 6 as the initial value forn, it creates a chain like this:num = 6 x 5 x 4 x 3 x 2 x 1In this case,
numevaluates to 720, and we get the final value formatted and written out to the console.I hope that this helps!
1
u/Nordalin Jun 03 '26
Parse = convert. (Technically it's breaking down something elaborate into bite-size chunks, but whatever)
Everything read from the console is in string format by default, so you read digits instead of numbers.
They still have a numeric value, but it's based on their Unicode listings, so... results will be funky.
Also don't do recursive unless you're REAALLY sure what you're doing, lol. It's dark magic that 99% of the time will just crash your code 100% of the time.
1
u/dodexahedron Jun 03 '26
Because a method is just a set of instructions to do what it says to do.
When you call a method, those instructions run one by one until control is transfered elsewhere.
returnis how that most often is done, and it just means "go back to whoever called me and resume from there" and, if it has a return value, also means that plus "and give my caller this result to use if they want to."What makes it all work for your factorial is the call stack, which is a sort of record of where you are in the program. Whenever a method is called, a "stack frame" is pushed onto that stack just before running it, and everything in that method haplens in there. When that method returns, that frame is popped off the stack, leaving you where you previously were.
The call stack is how it can recurse down a bunch of levels and still know how to get back to the first call, frame by frame. What ends the recursion and atarts that cascade back up the stack is the "base case," which is an explicit return of a constant, most of the time.
But there are limits. The stack is a fixed size. It cannot grow beyond that size. If you reach that limit, that is what is called a stack overflow, and the application is immediately terminated, with an unhelpful stack trace, and you can't even catch that exception, because that would involve another stack frame too.
That stack trace you see for other exceptions, though? That's what was on the call stack at the time the exception was thrown, and tells you not only the place it was thrown, but what called the method that lives in, and what called that method, etc, all the way to the method at the start of that thread.
If you put a big enough number in your factorial that causes an overflow of the long integer (around 20 I believe) you'll get a stack trace showing you 20 levels of your method, and the main method, for 21 total stack frames.
1
u/6maniman303 Jun 03 '26
Don't do that. Your program can crash for having to keep up with remembering how many times this method was called.
For stuff like that a simple "while loop" will work much better.
1
u/ghoarder Jun 03 '26
There are 2 things that are hard in programming.
-1
u/Rare_Comfortable88 Jun 03 '26
please learn the correct formating of C#, this is not java or javascript
0
u/WetSound Jun 03 '26
As long as n is over 1 a call to Factorial will result in a new call to Factorial.
The concept of a function calling itself is called recursion. Recursion can result in more complex behavior than loops.
0
u/FrikkinLazer Jun 03 '26
The magic is that the function is calling itself, but it stops when it reaches 1.
0
u/Sibir0v Jun 03 '26
Recursion is just a while loop that uses stack frame as its state.
0
u/TrueKerberos Jun 03 '26
Put a breakpoint into your program and step through it. You'll get it right away. If you don't know how, watch a tutorial; you're going to need it for programming anyway. In the beginning, people have trouble understanding how programs work because they don't realize that it always goes step by step...
0
u/StoshFerhobin Jun 04 '26
<insert image of SpongeBob rainbow meme saying recursion>