*: clean up bool comparison

This commit is contained in:
Gyu-Ho Lee
2016-04-02 18:27:54 -07:00
parent b0cc0e443c
commit c09f23c46d
11 changed files with 39 additions and 40 deletions

View File

@ -27,10 +27,12 @@ type Comparable interface {
Compare(c Comparable) int
}
type rbcolor bool
type rbcolor int
const black = true
const red = false
const (
black rbcolor = iota
red
)
// Interval implements a Comparable interval [begin, end)
// TODO: support different sorts of intervals: (a,b), [a,b], (a, b]