Combining infinite ranges

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jun 3 08:50:11 PDT 2010


On 06/03/2010 10:25 AM, Graham Fawcett 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?

My code sucks.

Andrei


More information about the Digitalmars-d mailing list