RFC on range design for D2
Bill Baxter
wbaxter at gmail.com
Wed Sep 10 17:41:48 PDT 2008
On Thu, Sep 11, 2008 at 9:32 AM, Bill Baxter <wbaxter at gmail.com> wrote:
> On Thu, Sep 11, 2008 at 8:17 AM, Steven Schveighoffer
>> To get the value there, I have to do:
>> all.after(center).left // or whatever gets decided as the 'get first value
>> of range' member
>> or if opStar is used:
>>
>> *all.after(center);
>
> Why is all that necessary? Can't you just do a *center?
Oh, I get it. It's empty. Duh.
Ok, so you can have third cursor function in the std lib:
T cursorValue(R,T)(R all, R center)
{
return all.after(center).left;
}
... plus the
cursorAdvance and cursorRetreat.
--bb
More information about the Digitalmars-d-announce
mailing list