Question
What does covariance in a Scala type parameter express?
Select an option. Your answer will be checked instantly.
Correct Answer: D. If A is a subtype of B, then F[A] is a subtype of F[B]
Explanation:
Covariance is marked with a plus sign on the type parameter.
It is appropriate for producer-like immutable types.
Leave a Reply