Formatted output of range of tuples

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Oct 13 00:52:40 PDT 2014


Ali Çehreli:

>     foreach (i, element; MyRange(42).enumerate) {
>         // ...
>     }
>
> versus sequence!"n" and zip:
>
>     foreach (i, element; zip(sequence!"n", MyRange(42))) {
>         // ...
>     }

But it's better to not use automatic unpacking of tuples. See 
issues 7361 and especially 9817.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list