Alternate signs in a range

Stanislav Blinov stanislav.blinov at gmail.com
Sun Jan 26 06:32:47 PST 2014


On Sunday, 26 January 2014 at 14:24:35 UTC, matovitch wrote:

> Well in a for loop, you only need one more index variable 
> whereas here we store the whole index range.

Not the *whole* range, that would be impossible since it's 
infinite :) In this particular instance, index range is a struct 
consisting of three variables: initial state (0), current 
sequencer (n), and current element as cache. D ranges are lazy. 
Well, most of them.


More information about the Digitalmars-d-learn mailing list