https://d.puremagic.com/issues/show_bug.cgi?id=11555

           Summary: std.algorithm.reverse should return the just-reversed
                    range
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Andrei Alexandrescu <[email protected]> 2013-11-19 10:48:14 
PST ---
>From communication with Chuck Allison:

Bearophile mentioned that .reverse was deprecated. The problem with that is
that std.algorithm.reverse doesn’t return anything, breaking code like:

auto compose_n(Fun)(Fun[] funs) pure {
    alias T = ReturnType!Fun; 
    return (T x) => reduce!((sofar,f) => f(sofar))(x,funs.dup.reverse);  // <==
uses .reverse
}

I now about std.functional.compose, but that’s not the point. For functional
programming, we need values returned for cases like this.

Thoughts?

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

Reply via email to