A Discussion of Tuple Syntax

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Aug 20 11:51:23 PDT 2013


On 8/19/13 11:39 PM, Timon Gehr wrote:
> On 08/20/2013 02:18 AM, Andrei Alexandrescu wrote:
>>
>> Why would it be necessary to return an object of type TypeTuple (i.e.
>> template tuple)?
>
>
> - Elegance. Eg:
>
> auto seq(T...)(T arg){ return arg; }
>
> auto fold(alias a,S,R)(S start, R range){ ... }
>
>
> seq(0,[1,2,3]).fold!((a,b)=>a+b);

But this is again a value tuple not a template tuple, no?

Andrei



More information about the Digitalmars-d mailing list