Broken UFCS Sucks

Peter Alexander peter.alexander.au at gmail.com
Fri Oct 21 00:50:49 PDT 2011


On 21/10/11 7:27 AM, Nick Sabalausky wrote:
> Just need to vent a little about this...
>
> This is very nice:
>
>          auto a = arr
>              .filter!"a<10"()
>              .map!"a*2"()
>              .reduce!"a+b"();
>

Can't you do

auto a = pipe!(filter!"a<10", map!"a*2", reduce!"a+b");

???

Still not quite as nice syntax, but better than all the nested parens.



More information about the Digitalmars-d mailing list