Module tanya.range.primitive
This module defines primitives for working with ranges.
Functions
Name | Description |
---|---|
getAndPopBack(range)
|
Returns the last element and removes it from the range. |
getAndPopFront(range)
|
Returns the first element and advances the range. |
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 and r2 point to the same element.
|
Manifest constants
Name | Type | Description |
---|---|---|
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
Name | Type | Description |
---|---|---|
ElementType
|
U
|
Returns the element type of the range R. |