News for hackers. Stuff that matters.
Re:My Go Resolutions for 2017 by bshanks on Sunday January 22, 2017 @06:13AM (#13454696)
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]

?

There are no comments on this comment yet.