downTo

inline fun Int.downTo(that: Int, lambda: (Int) -> Unit)

evaluates the supplied lambda block with the cursor starting at the receiver integer until it reaches the ending integer, step size is -1.

Parameters

<receiver>

Int

that

the lower limit

lambda

lambda expression to evaluate until reaching lower limit

inline fun Long.downTo(that: Long, lambda: (Long) -> Unit)

evaluates the supplied lambda block with the cursor starting at the receiver integer until it reaches the ending integer, step size is -1.

Parameters

<receiver>

Long

that

the lower limit

lambda

lambda expression to evaluate until reaching lower limit