kotlin-control-flow
Installation
SKILL.md
Kotlin control flow
Core principle
Make the classified value obvious, keep branch-local predicates on their branch, and let the compiler prove closed-domain coverage.
Procedure
- Name the value being classified. If every branch tests it, use
when (subject); otherwise keep a subjectlesswhenorifchain. - Choose the branch shape: