Range.rbound

Returns a range pointing to all elements that are less than a given key. Applicable to RedBlackTreeRange only.

Arguments

key
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; 10 r.rbound [print LF print TRUE] enum
Output:
{ key: 1; value: "ONE"; } { key: 2; value: "TWO"; }