How to create Scala classes that use generic types (cookbook examples)
alvin
June 21, 2015 - 1:17pm
This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 19.1, “How to create Scala classes that use generic types (cookbook examples).”
Problem
You want to create a Scala class (and associated methods) that uses a generic type.