fix documentation

pull/47/head
Benjamin Scher Purcell 9 years ago
parent 2339521ad9
commit d84c1f0a42

@ -38,17 +38,17 @@ type Node struct {
b int8 b int8
} }
// NewWith instantiates a red-black tree with the custom comparator. // NewWith instantiates an AVL tree with the custom comparator.
func NewWith(comparator utils.Comparator) *Tree { func NewWith(comparator utils.Comparator) *Tree {
return &Tree{Comparator: comparator} return &Tree{Comparator: comparator}
} }
// NewWithIntComparator instantiates a red-black tree with the IntComparator, i.e. keys are of type int. // NewWithIntComparator instantiates an AVL tree with the IntComparator, i.e. keys are of type int.
func NewWithIntComparator() *Tree { func NewWithIntComparator() *Tree {
return &Tree{Comparator: utils.IntComparator} return &Tree{Comparator: utils.IntComparator}
} }
// NewWithStringComparator instantiates a red-black tree with the StringComparator, i.e. keys are of type string. // NewWithStringComparator instantiates an AVL tree with the StringComparator, i.e. keys are of type string.
func NewWithStringComparator() *Tree { func NewWithStringComparator() *Tree {
return &Tree{Comparator: utils.StringComparator} return &Tree{Comparator: utils.StringComparator}
} }

Loading…
Cancel
Save