[Issue 9687] New: `std.algorithm.reduce` with default values isn't UFCS-able in regard to range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Mar 10 23:02:37 PDT 2013


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

           Summary: `std.algorithm.reduce` with default values isn't
                    UFCS-able in regard to range
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-03-11 09:02:36 MSK ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list