With the introduction of sealed classes in Kotlin, it opened up a way to easily handle restricted hierarchies. The most common use case of a sealed class is with the handling Result<T> of an API response. …..but there are way more applications of the sealed classes than you can imagine…