Generic programming is about writing reusable functions, classes, etc. without compromising on type safety. The primary motivation behind them is to keep code DRY, that is, to avoid code duplication.
The basic idea behind generic programming is that you can make functions and classes take a generic type parameter.
TODO.