+ 2
I tried this code in this way.. Can anyone help me find anything wrong in this code?
And also make this code more "Kotlinic" https://code.sololearn.com/cZ9C6Rmc7pll/?ref=app
1 Resposta
0
https://code.sololearn.com/cFaqZAo2gWIr/?ref=app
Major changes:
- Remove redundant array conversions
- Lift assignment out of when statement
- Lift map call out of when statement
- Replace reduce with call to sum
More idiomatic Kotlin :)