Range operator

The .. binary operator makes a half-open range. The range 1 .. 5 represents a range including 1, 2, 3, and 4, but not 5.

A range in Onyx represents an interval between two integer numbers. Ranges are used in two natural places in the language:

  • for loops
  • Making a slice