How to resolve this 'Unresolved reference'?

Hello,

You must declare your function before calling it, move your declaration of nextTwo() above the call.

fun nextTwo(num: Int) : Pair<Int, Int>{
    return Pair(num+1, num+10)
}

val (two, three) = nextTwo(1)
println("1, $two, $three")
1 Like

thanks.