Consume an entire range

Brad Anderson eco at gnuk.net
Wed May 29 21:34:10 PDT 2013


On Thursday, 30 May 2013 at 04:12:56 UTC, Diggory wrote:
> On Thursday, 30 May 2013 at 03:53:06 UTC, Brad Anderson wrote:
>> On Thursday, 30 May 2013 at 03:50:52 UTC, Brad Anderson wrote:
>>> Is there a simple way to consume a range apart from 
>>> std.array.array?  I don't need to result of the range stored 
>>> in an array, I just need a lazy map to evaluate completely.
>>
>> Obviously I could just popFront.  To be more clear, I want 
>> something like eat() or consume() or exhaust() that I can tack 
>> on the end of my chained algorithm calls.
>
> There's "walkLength"?

I tried that. There is an isInputRange && !isInfinite template 
constraint but I don't see how my stuff didn't meet that 
requirement.


More information about the Digitalmars-d-learn mailing list