Combining infinite ranges

Graham Fawcett fawcett at uwindsor.ca
Thu Jun 3 08:25:47 PDT 2010


On Thu, 03 Jun 2010 10:15:33 -0500, Andrei Alexandrescu wrote:

> On 06/03/2010 10:01 AM, Graham Fawcett wrote:
>>    import std.range;
>>
>>      auto enumerate(R)(R r) if (isInputRange!R) {
>>           return zip(iota(0, size_t.max), r);
>>      }
>>
>>      void main() {
>>        auto e = enumerate([10,20,30]);
>>      }
> 
> I cry bug.

LOL! Andrei, you are a very terse guy. :)

Do you cry a bug in my example, in std.range, or D 2.043?

Graham



More information about the Digitalmars-d mailing list