Why does coroutine continuation have the property ...
# coroutines
r
Why does coroutine continuation have the property of generic ~invariance~*contravariance*?
e
that is contravariant, not invariant
👍 1
s
Contravariance opens up the possibility that a type is a subtype of Continuation<T> if its generic type parameter is a supertype of T, adding a bit of typing flexibility while still having type-safety. I think that if it were invariant, then that flexibility just wouldn't be there.