There is also `Character.digit(ch: Char, radix: Int)`, so you can simply do it straight away with: `...
e
There is also
Character.digit(ch: Char, radix: Int)
, so you can simply do it straight away with:
Copy code
fun String.calc() = map { Character.digit(it, 10) }.reduce(Int::times)
r
elizarov: Cool, I didn't know that one.
I've actually been surprised how many Java tricks I've found working on Kotlin.