The task is to refactor the functions in Main.kt to incorporate more Kotlin idioms.
Please implement your solution by only changing the Main.kt file.
You can add more functions if you deem necessary but please do not rename the existing ones.
For testing your solution, use the following command
# Change directory to this challenge
cd 5_Kotlin_Refactoring
# Run test cases
./gradlew test
There is also a GitHub workflow (named: Verify #5 Kotlin Refactoring
), which will run on each push and verify the test cases.
Solutions will be judged, based on
- Tests are green
- The use of Kotlin idioms
- Readability of the refactored codes