step

fun step(start: Int, end: Int, step: Int): Slice<T, V>(source)

Selects indices from start to end with a specified step size.

This is equivalent to Python's slice notation start:end:step. Supports negative indexing for start and end parameters.

Return

a Step slice descriptor

Parameters

start

the starting index (inclusive), can be negative

end

the ending index (exclusive), can be negative

step

the step size (must be positive)

Throws