Range.last

Returns the last element of the range. Not applicable to RedBlackTreeRange.

Arguments

None

Return values

value
or
{ key: Key; value: Value; }
structure, depending on the range type.

Complexity

Constant

Example

"sl/linkedList" useFile "sl/hashTable" useFile l: (1 2 10 50) makeList; h: ((1 "ONE") (2 "TWO") (3 "THREE")) makeHashTable; r: l.makeRange; r.last print LF print h.makeRange.last print
Output:
50 { key: 3; value: "THREE"; }