The Many Faces of D - slides

bearophile bearophileHUGS at lycos.com
Sun Oct 3 08:21:23 PDT 2010


Simen kjaeraas:

> auto sum( R )( R range ) {
>      return reduce!"a+b"( 0, range );
> }

Summing an iterable is a really common operation, and using reduce is not an intuitive&easy thing. So I think a sum() needs to be added to std.algorithm, this was my enhancement request for it:

http://d.puremagic.com/issues/show_bug.cgi?id=4725

Bye,
bearophile


More information about the Digitalmars-d mailing list