"fold": a replacement for "reduce"
Timon Gehr
timon.gehr at gmx.ch
Thu Mar 27 15:33:49 PDT 2014
On 03/27/2014 07:04 PM, Meta wrote:
>
> It's a bit unintuitive as to what works and what doesn't (although it
> makes sense for the most part).
It doesn't make sense at all. It is an arbitrary limitation. The rule is
simple though: One can only alias things that syntactically look like
they might be types. This is why the following triviality is way more
useful than it should be:
alias Id(alias a)=a;
alias fun = Id!(a=>a); // ok!
More information about the Digitalmars-d
mailing list