Skip to content
← All posts

Kotlin

The Kotlin language itself — idioms, features and fundamentals, learned hands-on.

Kotlin

Kotlin Koans BR · Part 12

Kotlin Koans BR: Import alias

2 min read Beginner

When importing a class or function, you can give it a different name by adding as NewName after the import directive. This can be useful when…

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.