IE<T> is a simplified generic interface for traversing values. It exposes T only as the readable Current result, so the type parameter occupies an output position. section 7.2
abstract class Animal : Object {}
class Giraffe : Animal {}
class Tiger : Animal {}
These classes establish the assignment-compatibility hierarchy: Giraffe and Tiger both relate to Animal and Object, but not to each other. section 7.2
interface IE<T>
{
T Current { get; }
bool MoveNext();
}
The interface combines a Current result of type T with MoveNext, making its producer-like shape explicit. section 7.2
Covariant assignment
Without covariance, assigning IE<Giraffe> to IE<Animal> is rejected. Marking the interface as IE<out T> makes that assignment valid because consumers receive values but do not supply T values. section 7.2
interface IE<out T>
{
T Current { get; }
bool MoveNext();
}
The out modifier records the variance rule directly in the interface declaration. section 7.2
Mapping every type T to IE<T> preserves the assignment structure, suggesting a covariant endofunctor. Making that construction an endofunctor requires infinitely many nested constructed types. section 7.2
