concept generic programming in category c++

appears as: generic programming
Functional Programming in C++

This is an excerpt from Manning's book Functional Programming in C++.

With this solution, you’re no longer concerned about exactly how the counting is implemented; you’re just declaring that you want to count the number of newlines that appear in the given input stream. This is always the main idea when writing programs in the functional style—use abstractions that let you define the intent instead of specifying how to do something—and is the aim of most techniques covered in this book. This is the reason FP goes hand in hand with generic programming (especially in C++): both let you think on a higher level of abstraction compared to the down-to-earth view of the imperative programming style.