Stupid little iota of an idea
Peter Alexander
peter.alexander.au at gmail.com
Wed Feb 9 00:02:36 PST 2011
On 9/02/11 3:08 AM, Nick Sabalausky wrote:
> AUIU, foreach has both of these forms:
>
> foreach(x; 0..5)
> foreach(x; someRange)
>
> Also, we have:
>
> auto someRange = iota(0, 5);
>
> <snip>
> Pardon if this has already been suggested.
I have suggested it in the past, and I believe people had suggested it
before me. I agree, it does make perfect sense to add that syntax,
although it probably shouldn't be tied into Phobos (maybe add a druntime
version of iota?)
More information about the Digitalmars-d
mailing list