Delegation

Report a typo

Assume there is fun next(prev: Int): Int. Implement fun Int.nextValue(): Int which returns the same value as the first function.

Write a program in Kotlin
//Do not fix code below
fun next(prev: Int): Int = prev * 1000 - 10

//write your code here
___

Create a free account to access the full topic