Code written once for any type, with the type as a parameter, for example def first[T](xs: list[T]) -> T. The checker keeps track of which T is used at each call.
Generics
Code written once for any type, with the type as a parameter, for example def first[T](xs: list[T]) -> T. The checker keeps track of which T is used at each call.