handful and interval
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Sep 2 08:16:17 PDT 2012
On 9/2/12 4:56 PM, Jacob Carlborg wrote:
> On 2012-09-02 16:22, Andrei Alexandrescu wrote:
>
>> Same question about "interval", which is a fair amount more interesting
>> if done right. An interval is a pair of values from a type that supports
>> inequality comparison. It would have a variety of interval-specific
>> operations, of which this would probably be quite popular:
>>
>> int x;
>> ...
>> if (x in interval(1, 2))
>> {
>> ...
>> }
>
> Isn't this a bit like std.range.iota? Perhaps extending that returned
> value with opIn and other functionality.
Iota is a different notion (it has a step).
Andrei
More information about the Digitalmars-d
mailing list