A type parameter can be bounded using a type expression containing that same parameter. In Scala,
[T <: Ordered[T]] requires each admissible T to provide comparison with another T. This gives a generic minimum scan access to x < y for two elements of type T. An arbitrary unrelated upper bound would not establish the needed argument type. Articles by others on the same topic
There are currently no matching articles.