Replies: 1 comment 1 reply
|
Thanks, now I appreciate the full triplet - even in the case of value being found, it can still make sense to access previous/next. 1/ If a match is found by "lucky guess" somewhere between two bounding keys, wouldnt it cause additional cpu cost to provide the precise (next,prev) siblings ? 2/ I still think an explicit return type would be safer for wide usage. A DU with data can provide names to the items, or a struct record could do. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is the discussion thread for the
Map.binarySearch, RFC FS-1135 (link tbd): the addition of aMap.binarySearchfunction which would provide a way to find items with adjacent keys.All reactions