Range.unheadIter

Returns the first iterator for the range and the remaining range. If a head iterator is deleted from the corresponding container, the remaining range remains valid.

Arguments

None

Return values

iterator
pointing to the first element of the range.
The remaining
range
.

Complexity

Constant, O(log(size)) for RedBlackTree.

Example

"sl/array" useFile l: (1 2 3 -1 -2 -3 10 20 30 -10 -20 -30) makeArray; h:r: l.makeRange.unheadIter;; "ONE" h.set l [print "," print TRUE] enum
Output:
ONE,2,3,-1,-2,-3,10,20,30,-10,-20,-30