Recursive Functions
Let’s study recursion and go over it’s implementation in Dart.
Recursive functions are functions that call themselves in their own function body. This may seem a bit strange right now, but let’s see how this works.
Recursion
Recursion is the process of breaking down an expression into smaller and smaller expressions until you’re able to use the same algorithm to solve each expression. The smaller expressions are similar versions of the original expression.
One way to implement recursive functions is by using an if-else
statement. The if
represents the base case which is the smallest possible expression on which an ...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy