> Yea, but that won't work for forward ranges. It only provides opIndex if the > underlying range provides it. Since the chunk size is a runtime parameter it > can't implement opIndex efficiently for non-random access ranges.
But in your case, your range is random-access, no? Or else, you can always map array on the chunks... > > staticChunks was a bit of a misnomer. staticTake would be a better name. The > range would contains a static array and pops that number of elements from > the input range. Then, opIndex can easily be defined. What about takeExactly?