Module tanya.range.primitive

This module defines primitives for working with ranges.

Functions

NameDescription
moveAt(range, n) Moves the element at the position n out of the range.
moveBack(range) Moves the back element of a bidirectional range.
moveFront(range) Moves the front element of an input range.
popBackExactly(range, count) Removes exactly count last elements from the bidirectional range range.
popBackN(range, count) Removes maximum count last elements from the bidirectional range range.
popFrontExactly(range, count) Removes exactly count first elements from the input range range.
popFrontN(range, count) Removes maximum count first elements from the input range range.
put(range, e) Puts e into the range.
sameHead(r1, r2) Determines whether r1.front and r2.front point to the same element.

Manifest constants

NameTypeDescription
hasAssignableElements Determines whether the elements of R are assignable.
hasLength Detects whether R has a length property.
hasLvalueElements Determines whether R provides access to its elements by reference.
hasMobileElements Determines whether R is a range containing mobile elements, i.e. elements that can be moved out of the range.
hasSlicing Determines whether R is a forward range with slicing support (R[i .. j]).
hasSwappableElements Determines whether the elements of R can be swapped with swap.
isBidirectionalRange Determines whether R is a bidirectional range.
isForwardRange Determines whether R is a forward range.
isInfinite Determines whether R is an infinite range.
isInputRange Determines whether R is an input range.
isOutputRange Determines whether R is an output range for the elemens of type E.
isRandomAccessRange Determines whether R is a random-access range.

Aliases

NameTypeDescription
ElementType U Returns the element type of the range R.