2 comments

[ 2.8 ms ] story [ 43.0 ms ] thread
This is known as F-bounded polymorphism if you are interested in knowing more about this approach.
Awesome article, simple and to the point!