In the previous chapter, we talked about modern C++ in depth, especially about the new feature in C++11--the Lambda expression. As we discussed earlier, the Lambda expression is useful in simplifying function notation. Thus, in this chapter, we will apply the power of the Lambda expression again, which will be used in functional code, especially when we talk about currying--the technique to split and reduce the current function.
In this chapter, we will discuss the following topics:
- Applying the first-class function and higher-order function so that our functions can not only be invoked as a function, but also be assigned to any variable, pass a function, and return a function
- Pure function, to avoid side effect in our function since it no longer contacts an outside state
- Currying, as mentioned at the beginning of this chapter...