November 2017
Beginner
316 pages
6h 40m
English
Recursion is a technique in computer science that allows for a bigger problem to be broken down into smaller similar sub-problems that makes it easier to solve and debug.
Speaking about functions, we call a function recursive if it makes repeated calls to itself. This would typically involve the function having a base condition and being small enough to magnify itself easily enough to solve the overall problem.
Julia functions can also make recursive calls, just like any other language. Let's take the case of the Fibonacci series, wherein every number in the sequence is the sum of the previous two:
# fibonacci series1,1,2,3,5,8,13....
So, if you look closely, the number 2 is the sum of its previous two digits 1+1, and then the next ...
Read now
Unlock full access