I dun a DIP, possibly the best DIP ever

John Colvin john.loughran.colvin at gmail.com
Sun Apr 26 09:24:15 UTC 2020


On Saturday, 25 April 2020 at 21:33:35 UTC, Walter Bright wrote:
> On 4/25/2020 3:27 AM, Stefan Koch wrote:
>>       template Add3(alias y)
>>       {
>>          enum Add3 = y + 3;
>>       }
>> 
>>       enum x = staticMap!(Add3, big_seq).length;
>
> Can also do:
>
>     enum x = staticMap!("a + 3", big_seq).length;
>
> or:
>
>     enum x = staticMap!(y => y + 3, big_seq).length;
>
> which looks a little nicer.

You most certainly can't right now.


More information about the Digitalmars-d mailing list