D-Programming-Language/phobos — pull request #1970 by monarchdodra (2014-02-26 22:12:27+00:00)
Title: Give sum a seed capability

This gives `sum` a seed capability, which can be used to override the range's type, and change the summing primitive. @andralex : Do you have time review the design? This was your original submission, so I don't want to add anything you wouldn't agree with.

I think it makes a nice way to customize `sum`'s behavior, and is still relatively similar to what `reduce` does. The "seed" is the second argument, for UFCS friendliness.