Never miss a beat

Join my newsletter.

Tag: type-bounds

Upper and Lower Bounds in Scala

Published: 4/9/2018

Its pretty common to find yourself working with generics in Scala, but you may find yourself where you want a generic with some constraints. Generally, these constraints can be boiled down to "Subclass" or "Superclass" and Scala offers functionality out of the box to help facilitate this.