i think the way you defined it, covariant and contravariant are identical; in your contravariant definition, swap the names of "A" and "B" and you get:
if B >: A, then F[A] <: F[B]
and B >: A means the same as A <: B, so this means: if A <: B, then F[A] <: F[B]
which is the same as your covariant definition.Perhaps you meant:
If F[_] is "contravariant", it means that if A <: B, then F[B] <: F[A]
?
I wrote Scala for the last 2 years and was the resident type system "expert", so I had to explain variance to people pretty often. Luckily, it's a pretty quick, mathy definition:
Some notation first:
Now for the definitions: Examples of covariant type constructors are List and Functions in their output. An example of a contravariant type constructor is Functions in their input type.^ This is all that needs to be said! I can write it on a whiteboard in ~5 minutes. I'd say that's a reasonable thing to be expected to learn.
[1] https://www.reddit.com/r/golang/comments/3gtg3i/passing_slic...