digitalmars.D.learn - Range of variables
- Freddy (10/10) Sep 30 2015 Is there a way to make a range of a variables lazily?
- anonymous (5/15) Sep 30 2015 There's std.range.only which gives you a range over the arguments
- Atila Neves (3/13) Oct 01 2015 std.range.iota
Is there a way to make a range of a variables lazily?
---
int var1;
int var2;
void func()
{
int var3;
auto range = /*range of var1,var2,var3*/ ;
}
---
Sep 30 2015
On Wednesday, 30 September 2015 at 20:11:56 UTC, Freddy wrote:
Is there a way to make a range of a variables lazily?
---
int var1;
int var2;
void func()
{
int var3;
auto range = /*range of var1,var2,var3*/ ;
}
---
There's std.range.only which gives you a range over the arguments
you pass without allocating an array for them. Not sure what you
mean by "lazily".
http://dlang.org/phobos/std_range.html#only
Sep 30 2015
On Wednesday, 30 September 2015 at 20:11:56 UTC, Freddy wrote:
Is there a way to make a range of a variables lazily?
---
int var1;
int var2;
void func()
{
int var3;
auto range = /*range of var1,var2,var3*/ ;
}
---
std.range.iota
Atila
Oct 01 2015









anonymous <anonymous example.com> 