Generics (added in Go 1.18) let you write functions and types that work with multiple types via type parameters, while keeping compile-time type safety. They eliminate the old trade-off of either duplicating code per type or losing safety with interface{}.
The problem generics solve
{ ... }
{ ... }
{} { ... }
