jastrachan | 31 Mar 09:11 2005
Picon

Re: thoughts about the Range concept

On 30 Mar 2005, at 20:06, John Rose wrote:
> On Mar 30, 2005, at 7:06, jastrachan@... wrote:
>>> c) lowerBound <= a <= upperBound does _not_ imply
>>>    (lowerBound..upperBound).contains(a)
>> It does currently at least
>
> Since a Range as a List contains a finite sequence of discrete 
> elements, that breaks the List contract.
> Range probably needs a separate method for queries of the 
> mathematically continuous interval:
> (lo..hi).intervalContains(x) ==> (lo <= x && x < hi)

I don't follow? In which cases would

range.contains(x) != range.intervalContains(x)

James
-------
http://radio.weblogs.com/0112098/


Gmane