range

.range from:{Number? = null} to:{Number? = null} -> Range

Creates a range of numbers, which can also be iterated through.

The behavior of an open range is delegated to the consumer. For instance, using a left-open range with foreach will make the loop start from 1.

The difference between this function and the built-in .. operator is that the latter does not allow for dynamic evaluation, hence both ends must be literals. This function allows evaluating ends dynamically: for instance, .range from:{1} to:{.sum {1} {2}}.

Floating-point numbers are truncated to integers.

Parameters

from

start of the range (inclusive). If unset, the range is infinite on the left end

to

end of the range (inclusive). If unset, the range is infinite on the right end. to from