2 comments

[ 4.5 ms ] story [ 18.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!