Formatted output of range of tuples

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Oct 8 16:28:32 PDT 2014


anonymous:

> You can turn the tuples into ranges with `only`:
>
> writef("%(%(%s %)\n%)", zip(indexes, source).map!(t => 
> only(t.expand)));

This is a nice idea. Expand can probably be replaced by a []. I 
presume this works only if the types inside the tuple are the 
same.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list