Combining infinite ranges

Simen kjaeraas simen.kjaras at gmail.com
Thu Jun 3 15:35:10 PDT 2010


On Thu, 03 Jun 2010 17:25:47 +0200, Graham Fawcett <fawcett at uwindsor.ca>  
wrote:

> 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?

This is Bugzilla 3123.
http://d.puremagic.com/issues/show_bug.cgi?id=3123

-- 
Simen


More information about the Digitalmars-d mailing list