Scoop API

scoop:scoop.core:0.1.0

IntRange

class IntRange

source · line 5
public
public class IntRange internal constructor(
    private val first: Int,
    private val endpoint: Int,
    private val stride: Int,
    private val descending: Boolean,
    private val inclusive: Boolean
) : Iterable<Int>, Contains<Int>

An integer progression with a fixed direction, positive step, and inclusive or exclusive endpoint. Iteration checks the endpoint before arithmetic can wrap.

function step

source · line 22
public
public infix fun step(value: Int): IntRange

Returns a progression with the requested positive step magnitude, preserving direction and endpoint policy. Zero or negative signed steps are invalid.