Klitos Kyriacou
12/23/2024, 12:19 PMfun Int.digits(base: Int = 10): List<Int> =
if (this < base)
listOf(this)
else
(this/base).digits() + this % base
IntelliJ IDEA (latest version, K2 mode) falsely warns that this < base
is always false.Roman Golyshev
12/23/2024, 1:53 PM