The Python range object that range() gives in a template.
It prints as range(0, 3), has a length, takes an index or a slice, supports in, and gives its items when a template iterates over it. A slice of a range is a range.
Summary
Functions
Returns {:ok, item} for the item at index, which can be negative, or :error.
Returns true if item is an item of range. An integer is an item when the arithmetic of the range gives it, and another value when it equals an item.
Returns the Python repr() of range, such as range(0, 3) or range(0, 10, 2).
Returns the number of items of range.
Returns range[start:stop:step] as a range, where start and stop are the bounds that slice.indices gives for the length of range.
Returns the items of range as a list.
Types
Functions
Returns {:ok, item} for the item at index, which can be negative, or :error.
Returns true if item is an item of range. An integer is an item when the arithmetic of the range gives it, and another value when it equals an item.
Returns the Python repr() of range, such as range(0, 3) or range(0, 10, 2).
@spec size(t()) :: non_neg_integer()
Returns the number of items of range.
Returns range[start:stop:step] as a range, where start and stop are the bounds that slice.indices gives for the length of range.
Returns the items of range as a list.