upTo

inline fun Int.upTo(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 upper limit

lambda

lambda expression to evaluate until reaching upper limit

inline fun Long.upTo(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 upper limit

lambda

lambda expression to evaluate until reaching upper limit