If r is nonempty, returns three values: the key at rank 0 of the domain, the set of values it
is mapped to, and true; if empty, returns nil, nil, and false. O(log n).
If r is nonempty, returns three values: the key with the largest rank in the domain, the set
of values it is mapped to, and true; if empty, returns nil, nil, and false. O(log
n).