Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal

interval

interval

(T 
type
:
integer, from T, through option T, step T)
:
Set T
 is
[Module base]
An interval `from..through` that includes `from`, `from+step`, `from+step+step`,
etc. up to and including `through`.

In case step is positive (negative), the first value larger (smaller) than
through will not be included.

In case `step.sign = (from ⋄ through).sign`, this `Set` is empty, e.g.,
`interval 1 2 -1` and `interval 2 1 1` are both empty.

Type Parameters

T
:
integer
[Module base]

Fields

from
 T
[Module base]
the first element of this Set when used as a Sequence
through
 option T
[Module base]
upper/lower bound for elements in this Set

in case this is nil, there is no bound except for the
range of legal values for T.
step
 T
[Module base]
the distance between to elements

Functions

group the elements of this sequence by a key of type K

f determines the key of an element
0.094dev (2025-06-18 15:08:51 GIT hash 89cffc23ae669b0898a5564fefbf793fcb8e5ca7 built by fridi@fzen)