Using Generics in Scala

Scala has, in it’s core library, several classes that are intended to contain (at some point or another) some instance of another class. A few examples of this are seen in OptionĀ and Future. These container classes allow you to act upon values that may or may not exist or even to work with values that should appear in the future (hence the name “Future”). The idea of these container classes is fundamentally simple.