Range.subRange

Returns a subrange by relative indexes of its start and end. Applicable to ArrayRange only.

Arguments

firstIndex
is the index of subrange start.
afterLastIndex
is the next index after subrange end.

Return values

The resulting

range
.

Complexity

Constant

Example

"sl/array" useFile l: (1 2 3 -1 -2 -3 10 20 30 -10 -20 -30) makeArray; r: 1 11 l.makeRange.subRange; r.sort drop l [print "," print TRUE] enum LF print r [print "," print TRUE] enum
Output:
1,-20,-10,-3,-2,-1,2,3,10,20,30,-30