Formatted output of range of tuples
Ali Çehreli via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Oct 8 15:03:01 PDT 2014
On 10/08/2014 02:34 PM, anonymous wrote:
> You can turn the tuples into ranges with `only`:
>
> writef("%(%(%s %)\n%)", zip(indexes, source).map!(t =>
> only(t.expand)));
I haven't measured the performance but there is also the following
automatic expansion of tuple members as slice elements:
... zip(indexes, source).map!(t => [ t ]));
Probably the same thing...
Ali
More information about the Digitalmars-d-learn
mailing list