On 30-Jun-12 15:35, Tobias Pankrath wrote:
Say I have a forward range (for example, an SList[]). I would like to
create a new range containing only the first 5 elements of that old
range. How can I do that?


std.algorithm.take.

But I would generally avoid SList.

Indeed. I'd be hard pressed to devise realistic use case where it performs better.

That makes me think that a proper type people should be using is the unrolled list, that is a list of fixed-sized array chunks.

Or even chunked array like bearophile suggests.
--
Dmitry Olshansky


Reply via email to