April 18, 2009 Second parameter with ranges | ||||
|---|---|---|---|---|
| ||||
How do you do something like the following with ranges?
auto foo = someRange([1U, 2, 3, 4, 5]);
foreach(index, elem; foo) {
writeln(index, " ", elem);
}
Has this been addressed yet?
| ||||
April 18, 2009 Re: Second parameter with ranges | ||||
|---|---|---|---|---|
| ||||
Posted in reply to dsimcha | dsimcha wrote:
> How do you do something like the following with ranges?
>
> auto foo = someRange([1U, 2, 3, 4, 5]);
> foreach(index, elem; foo) {
> writeln(index, " ", elem);
> }
>
> Has this been addressed yet?
No :o(.
Andrei
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply