https://issues.dlang.org/show_bug.cgi?id=14293

          Issue ID: 14293
           Summary: min and max with predicate
           Product: D
           Version: D2
          Hardware: x86
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: [email protected]
          Reporter: [email protected]

There should be overloads of min and max with a predicate, e.g. the code below
chooses the shortest string out of three:

string x, y;
...
auto s = min!((a, b) => a.length < b.length)(x, y, "hello");

--

Reply via email to