Mastering Scala Basics: Sequencing Computations
Generic types allows us to abstract over types. If we don’t care what type is stored but we want to make sure we preserve the type when we get the value out, then use a generic type. Generic classes or traits takes a type parameter within a square bracket [ ]. The Scala convention is […]