Range.bound

Returns a range pointing to all elements with keys within given bounds. Applicable to RedBlackTreeRange only.

Arguments

lowerKey
is the lower bound, inclusive.
upperKey
is the upper bound, exclusive.

Return values

The resulting

range
.

Complexity

O(log(treeSize))

Example

"sl/redBlackTree" useFile rb: ((1 "ONE") (2 "TWO") (10 "TEN") (50 "FIFTY")) makeRedBlackTree; r: rb.makeRange; 2 20 r.bound [print LF print TRUE] enum
Output:
{ key: 2; value: "TWO"; } { key: 10; value: "TEN"; }