Chapter 8. Creating and Debugging Application in Functional Approach
We discussed some basic techniques to develop functional programming in the previous chapters that include a first-class function, a pure function, and an immutable object. In this chapter, we will use all the techniques we have learned in the previous chapters to produce an application in a functional way. It will also explain how to debug an application that is built using the C++ language.
In this chapter, we will cover the following topics:
- Preparing an imperative code as a base code to be transformed to the functional code
- Implementing the pure function to the base code
- Implementing the template metaprogramming to the base code
- Implementing the filtering technique to the base code using the Lambda expression
- Implementing the recursion technique to the base code
- Implementing the memoization technique to the base code
- Debugging the code to solve, if we get an unexpected result