Rust switches to external iteration

Peter Alexander peter.alexander.au at gmail.com
Thu Jul 4 02:49:22 PDT 2013


On Thursday, 4 July 2013 at 08:18:22 UTC, Timon Gehr wrote:
> It should be as simple as:
>
> auto map(alias a,R)(R r){
>     foreach(x;r)
>         yield a(x);
> }

... if all you care about is input ranges ...

I don't think there's any way to automatically infer and 
implement random access, bidirectionality etc. on ranges from an 
internal iteration definition.


More information about the Digitalmars-d mailing list