www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



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: -------
Mar 10 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9687


monarchdodra gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra gmail.com



For reference: http://forum.dlang.org/thread/jorsc4$kvo$1 digitalmars.com

As for the fix, which was submitted 5 months ago:
https://github.com/D-Programming-Language/phobos/pull/861

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 11 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9687


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



10:00:19 MSK ---
*** This issue has been marked as a duplicate of issue 8755 ***

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