Generics in Kotlin

What are Generics in Kotlin?

They enable types (classes and interfaces) to be parameters when defining classes, interfaces, and methods/functions. Much like the more familiar formal parameters used in the method declarations, type parameters provide…