Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
Map is a ordered map from K to V.
Example ¶
package main import ( "fmt" "strings" "github.com/ajwerner/btree" ) func main() { m := btree.MakeMap[string, int](strings.Compare) m.Upsert("foo", 1) m.Upsert("bar", 2) fmt.Println(m.Get("foo")) fmt.Println(m.Get("baz")) it := m.Iterator() for it.First(); it.Valid(); it.Next() { fmt.Println(it.Cur(), it.Value()) } }
Output: 1 true 0 false bar 2 foo 1
type Set ¶
Set is an ordered set of items of type T.
Click to show internal directories.
Click to hide internal directories.