-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Current
btree.insert("a", 1);
btree.insert("alphabet", 2);
btree.insert("b", 3);
let iter = btree.scan(?"a", ?"alphabet");
// iter -> ("a", 1), ("alphabet", 2)Proposed change
Suppose I wanted to search for all words between "a" and "b" but didn't know the last word starting with "a" was alphabet, I wouldn't be able to do that with the existing scan() method. Enter scanBoundary():
type Boundary<K> = {
#Inclusive: K;
#Exclusive: K;
};
let iter = btree.scanBoundary(?#Inclusive("a"), ?#Exclusive("b"));
// iter -> ("a", 1), ("alphabet", 2)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels