Covariance, Contravariance and Culture in Scala
Shani Elharrar

Hi Shani,

Nice post! I think the definition of Covariance and Contravariance is a bit loose, or perhaps my understanding of the definition is flawed. Covariance and Contravariance are about *the container* of the generic type, or as sometimes referred to in Scala as a “first order kind”, in a way that either preserves, reverses, or is invariant in respect to the “is subtype of” relation (<: ). For example, if A <: B, than M[A] <: M[B] for Covariance.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.