Creates a range structure.
range(a[, b[, k]])
k are integers, then
range(a, b, k) returns the structure
from: a to: b step: k
b defaults to
1, so that
range(a, b) returns
from: a to: b step: 1
from: a to: a step: 1.
IntRange structures are used as input to some function, notably
part, and specify ranges of indices. Typically, if
a ≤ b, then
range(a, b) means all indices from
b (inclusively), so that
range(a) means the single index
a. Indices typically can be given both as positive numbers (counting from the first index) or as negative numbers (counting from the last index), and if
b denotes an index preceding
part(a, b) denotes the indices from
a in reverse order. If
step > 1, only every
stepth index will be included. Usually, it doesn’t make sense for
step to be non-positive.
part for examples.