Featured
Want Discriminated Unions in Kotlin? Use a Sealed Class.
Does Kotlin support discriminated unions? In a way, yes! See how you can use sealed classes to replicate their function.
Kotlin •
July 23, 2025