Closed tvuotila closed 10 years ago
Good job with this one too. If we want to do this in a more generic manner we need to add support for IntervalSets. IntervalSet would be an ordered set of intervals. Union would return an IntervalSet if the given intervals are discontinuous.
Add union operator so that
Interval([1, 3]) | Interval([2, 4]) == IntInterval([1, 4])