Reduce help..

David Nadlinger see at klickverbot.at
Fri Sep 2 11:09:46 PDT 2011


On 9/2/11 8:05 PM, David Nadlinger wrote:
> On 9/2/11 7:23 PM, David Nadlinger wrote:
>> […] because reduce is really just another way to express
>> the above loop.
> ´
> On second thought: The one-argument overload of it, that is. You can
> also use differing types if you explicitly specify the starting value.
> For your example you could do something like:
> reduce!"max(a, b[0].length)"(0, …).
>
> David

… as Vladimir already posted. Gah, I should really refresh d.D.learn 
before posting, it's quite impressive how fast simple questions are 
often answered here…

David


More information about the Digitalmars-d-learn mailing list