Slices

A slice is a range of integers.

Type

The type is defined in the library as

slice[int]

Inclusive Slice

From first to last, inclusive:

first..last

Exclusive Slice

From first to last, exclusing last:

first..<last

Counted Slice

From first for a certain number of values:

first.+count

Infinite Slices

Felix provides three apparently infinite slices, which are actually bounded by the limits of the integer type:

first..     // first..maxval[int]
..last      // minval[int]..last
..<last     // minval[int]..<last

There is also a slice over the whole range of a type:

Slice_all[int]
..[int]

Empty Slice

There is an empty slice too:

Slice_none[int]

More Slices

More detail on slices in the reference manual:

https://felix.readthedocs.io/en/latest/slices.html