Chapter 4. Hello Recursion!
In this chapter, we’ll take a look at recursion. We’ll learn why it’s important in Haskell programming and how we can find very concise and elegant solutions to problems by thinking recursively.
Recursion is a way of defining functions in which a function is applied inside its own definition. In other words, the function calls itself. If you still don’t know what recursion is, read this sentence. (Haha! Just kidding!)
Kidding aside, the strategy of a recursively defined function is to break down the problem at hand into smaller problems of the same kind and then try to solve those subproblems, breaking them down further ...