Iterating over multiple collections in parallel

bearophile bearophileHUGS at lycos.com
Fri Jul 4 08:18:06 PDT 2008


downs:
>   auto iter2 = generator((void delegate(int) yield) {
>     foreach (entry; it2) yield(entry);
>   });
> 
>   foreach (entry1; it1) {
>     auto entry2 = iter2();
>     writefln(entry1, " - ", entry2);

Nice :-)

Bye,
bearophile



More information about the Digitalmars-d mailing list