[Issue 4847] New: std.algorithm.topN documentation

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 9 13:02:36 PDT 2010


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

           Summary: std.algorithm.topN documentation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: websites
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-09-09 13:02:12 PDT ---
This program seems correct (DMD 2.048):

import std.algorithm: topN;
void main() {
    int[] a = [10, 1, 7];
    topN(a, 10);
}


I'd like the documentation of topN to specify what does it happen when the
specified 'nth' argument is bigger than the length of the given range.  

And I think it's better to add an usage example of topN(r1, r2).

-- 
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