if it didn't though, I'd probably have ``` fun Int...
# getting-started
d
if it didn't though, I'd probably have
Copy code
fun Int.toThe(exponent: Int): Int = when {
  exponent == 0 -> 1
  exponent < 0 -> 0
  else -> Math.pow(this.toDouble(), exponent.toDouble()).toInt()
}