30 days of code in Go: Day 9 - Recursion
Hi there! Here I am coding again. For those of you readers who may not know what recursion is, I have a brief explanation: a function is called a recursive function when it calls itself. A very nice example is the factorial, which is also what I am going to code today. For the factorial of NN, f(N)f(N), we can state that f(N)=N×f(N−1)f(N) = N\times f(N-1). What we see is that the function is represented by itself, but with other argument and it can keep this going up to a certain point for which we know the answer like f(1)=f(0)=1f(1)=f(0)=1. Given this introduction, I will code. ...