Bounded polymorphism
It is also possible to support forms of bounded polymorphism, where constraints are expressing on possible instantiating types; examples:
- polymorphic over all types that support =
- polymorphic over all types that support + , *
- polymorphic over all types that support print
- polymorphic over all tuples with at least two components
- polymorphic over all records with hd and tl fields
- …
-
-