Getting acquainted with functional, procedural, and backtracking recursion
So now that we have understood a little about recursion, the recursion function will call itself from inside its body. The recursion will be stopped only when it has reached a certain value. There are three types of recursion that we will discuss right away--functional recursion, procedural recursion, and backtracking recursion; however, these three types of recursion may not be standard terms. Functional recursion is a recursion process that returns some value. Procedural recursion is a recursion process that doesn't return a value, yet performs the action in each recursion it takes. Backtracking recursion is a recursion process to break down the task into a small set of subtasks that can be cancelled if they don't work. Let's consider these recursion types in the following discussion.
Expecting results from functional recursion
In functional recursion, the process tries to solve the problem by combining the results...