http://d.puremagic.com/issues/show_bug.cgi?id=5513
Summary: Erroneous example in std.algorithm Product: D Version: D2 Platform: Other URL: http://digitalmars.com/d/2.0/phobos/std_algorithm#schw artzSort OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: websites AssignedTo: nob...@puremagic.com ReportedBy: simen.kja...@gmail.com --- Comment #0 from Simen Kjaeraas <simen.kja...@gmail.com> 2011-02-01 07:41:15 PST --- This examples is on the std.algorithm doc page: uint hashFun(string) { ... expensive computation ... } string[] array = ...; // Sort strings by hash, slow sort!("hashFun(a) < hashFun(b)")(array); // Sort strings by hash, fast (only computes arr.length hashes): schwartzSort!(hashFun, "a < b")(array); As we all know, *naryFun can't access local symbols, so this example does not compile. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------