4 ms·
If the author is reading: > Covariant: Given two types A and B, A covariant B if B is a A. In other word, A covariant B if B is a prefix of A. Taken from here
by thwd 11y ago
If the author is reading:
> Covariant: Given two types A and B, A covariant B if B is a A. In other word, A covariant B if B is a prefix of A.
Taken from here: https://github.com/google/badwolf/blob/master/docs/temporal_graph_modeling.md https://github.com/google/badwolf/blob/master/docs/temporal_...
Co(ntra)variance only makes sense if you define a subtype relation first. And I think that's what you wanted to define here.
After skimming through the docs I think what you want is: A is a subtype of B if B's path is a prefix of A's.