Bug 9687 – `std.algorithm.reduce` with default values isn't UFCS-able in regard to range
Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-10T23:02:00Z
Last change time
2013-03-22T00:00:19Z
Assigned to
nobody
Creator
verylonglogin.reg
Comments
Comment #0 by verylonglogin.reg — 2013-03-10T23:02:36Z
As `reduce` accepts range as the last argument when used with default values one can't use it in UFCS chain like this:
---
range.map!f().filter!g().reduce!h(x)
---
Currently `reduce` can only be used like this:
---
reduce!h(x, range.map!f().filter!g())
---
which is ugly.