func NewTypeTree() *TypeTree { t := TypeTree{} t.tree = llrb.New(lessPtr) t.Index = 0 emptyPtrNode = &llrb.Item{0, "", 0, 0} return &t }
// rebuildIndex does the work of regenerating the index // with the given keys. func rebuild(less LessFunction, keys <-chan string) *llrb.LLRB { tree := llrb.New() for key := range keys { tree.ReplaceOrInsert(llrbString{s: key, l: less}) } return tree }
func New() *ZSet { tree := llrb.New() set := make(map[string]int) zs := &ZSet{tree, set} return zs }