stride

func stride<T : Strideable>(from: T, to: T, by: T.Stride)

Return the sequence of values (start, start + stride, start + stride + stride, ... last) where last is the last value in the progression that is less than end.

Declaration

func stride<T : Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T>
func stride<T : Strideable>(from: T, through: T, by: T.Stride)

Return the sequence of values (start, start + stride, start + stride + stride, ... last) where last is the last value in the progression less than or equal to end.

Note: There is no guarantee that end is an element of the sequence.

Declaration

func stride<T : Strideable>(from start: T, through end: T, by stride: T.Stride) -> StrideThrough<T>