Question
What does contravariance express?
Select an option. Your answer will be checked instantly.
Correct Answer: A. If A is a subtype of B, then F[B] is a subtype of F[A]
Explanation:
Contravariance reverses the subtype relation.
It is commonly useful for consumer-like abstractions.
Leave a Reply