Range.untail
Returns the range without its last element, and that last element.
Arguments
None
Return values
The remaining
range
.value
or { key: Key; value: Value; }
structure of the last element, depending on the range type.
Complexity
Constant, O(log(size)) for RedBlackTree.
Example
Output:
1,2,3,-1,-2,-3,10,20,30,-10,-20,-30
{ key: 1; value: "ONE"; },{ key: 2; value: "TWO"; }