Skip to content
FutureBlitz

    Install

    Import std.core.range

    Range

    std.core.range

    struct

    Public Struct Range<T: Numeric> Implements Iterator<T>, Iterable<T>

    The integers from a start to an end, by a step, as a range like 0 Until 10 gives them.

    Examples

    Local evens: Int[] = []
    For i In 0 Until 10 Step 2
        evens.Add(i)
    End For
    
    Expect(evens == [0, 2, 4, 6, 8])
    Expect((10 To 0 Step -5).ToArray() == [10, 5, 0])

    std/core/range.fb, line 24

    • Public ByRef Method Next(): T? method #

      The next value, or Null after the last one.

    • Public Method Iterate(): Range<T> method #

      A copy of the range, which goes over its values from where it is.

    Report an issue with this page or with FutureBlitz on GitHub.