Skip to content

Instantly share code, notes, and snippets.

@tedsuo
Created May 28, 2015 15:08
Show Gist options
  • Save tedsuo/c50aa3df373c7ed92db9 to your computer and use it in GitHub Desktop.
Save tedsuo/c50aa3df373c7ed92db9 to your computer and use it in GitHub Desktop.
range interface
type Range interface {
Add(low, high int)
Remove(low, high int)
Contains(int) bool
Lowest() int
Highest() int
Each(func(int, int) bool)
Union(Range) Range
Compliment(Range) Range
Intersection(Range) Range
Clone() Range
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment