You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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():
typeBoundary<K>= {
#Inclusive: K;
#Exclusive: K;
};
let iter = btree.scanBoundary(?#Inclusive("a"), ?#Exclusive("b"));
// iter -> ("a", 1), ("alphabet", 2)
Current
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. EnterscanBoundary():