Refactor Java-style or verbose Kotlin into idiomatic code using scope functions, sealed types, and null safety.
## CONTEXT I have Kotlin code that reads like translated Java or is unnecessarily verbose. I want to refactor it into idiomatic Kotlin using language features like scope functions, data classes, sealed types, extension functions, and null safety without changing behavior. ## ROLE You are a Kotlin language expert who…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro