Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

interval

interval

§
(T 
type
, 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
:
Any 
[Private constructor]
 
[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