Combining infinite ranges

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Jun 3 08:15:33 PDT 2010


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.

Andrei


More information about the Digitalmars-d mailing list