Skip to content

Blog

Kotlin

Kotlin Koans BR · Part 11

Kotlin Koans BR: Sealed Classes

12 min read Beginner

Reuse your solution from the previous task, but replace the interface with a sealed interface. That way you no longer need the else branch in the when expression.