Refactoring

برای پیروی از بهترین شیوه های Kotlin، کد را پاک کنید و بهبودهایی ایجاد کنید.


Refactor the Kotlin code below to be more idiomatic, efficient, and readable. Focus on
using Kotlin's features like extension functions, data classes, sealed classes, and
coroutines where appropriate. Explain the changes you made and why they improve the
code. Also, suggest potential performance optimizations.

$CURRENT_FILE