Skip to content

Glossary: Kotlin Beyond the Basics

contravariant

Also written: in T

A type parameter marked `in` is only taken in, never returned, so `Rule<Priced>` can stand in for `Rule<MenuItem>`.

Where the book teaches it

Related terms

covariantvariance