Creating a Sub-view of a non - RA (hasSlicing) range.

Tobias Pankrath tobias at pankrath.net
Sat Jun 30 04:35:06 PDT 2012


> 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.


More information about the Digitalmars-d mailing list