Combining infinite ranges

Steven Schveighoffer schveiguy at yahoo.com
Tue Jun 1 14:06:00 PDT 2010


On Tue, 01 Jun 2010 13:54:01 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> The output of the program is:
>
> 0	Tuple!(uint,uint)(0, 0)
> 1	Tuple!(uint,uint)(0, 1)
> 2	Tuple!(uint,uint)(1, 1)
> 3	Tuple!(uint,uint)(1, 0)
> 4	Tuple!(uint,uint)(0, 2)
> 5	Tuple!(uint,uint)(1, 2)
> 6	Tuple!(uint,uint)(2, 2)
> 7	Tuple!(uint,uint)(2, 0)
> 8	Tuple!(uint,uint)(2, 1)
> 9	Tuple!(uint,uint)(0, 3)
> 10	Tuple!(uint,uint)(1, 3)
> 11	Tuple!(uint,uint)(2, 3)
> 12	Tuple!(uint,uint)(0, 4)
> 13	Tuple!(uint,uint)(1, 4)
> 14	Tuple!(uint,uint)(2, 4)

It looks like you're missing some iterations there.

-Steve


More information about the Digitalmars-d mailing list