RedBlackTree.first

Returns the first entry of the tree.

Arguments

None

Return values

{ key: Key; value: Value; }
structure is the first entry. It will be an entry with the smallest key because a tree is always sorted.

Complexity

Constant

Example

"sl/redBlackTree" useFile a: RedBlackTree; 35 "element" a.insert 0 "ZERO" a.insert 34 "element" a.insert -25 "element" a.insert 19 "nineteen" a.insert 3481 135 a.insert 32 { a:0; b:1; } a.insert a.first print
Output:
{ key: -25; value: "element"; }