In this chapter, we looked at different types of code similarities and how we can reduce them through various functional programming techniques. From repeated parameters that can be replaced with partial application, to chained calls that can be turned into functional composition, all the way to the wonderfully complex world of structural similarities that can be removed through higher-level functions, you are now well armed to notice and reduce similarity in any code base you work with.
As you have noticed, we started to discuss code structures and software design. This leads us to another core principle of design—high cohesion and low coupling. How do we increase cohesion using functions? It turns out that that's where classes are very useful and this is what we will discuss in the next chapter.