[Tutor] When max() doesn't work as expected

Alan Plum alan.plum at uni-koeln.de
Fri Dec 4 09:21:08 CET 2009


On Fr, 2009-12-04 at 08:21 +0100, spir wrote:
> By the way, is there any reason why the compare func parameter is called 'key'?

I'd guess because what you provide creates keys for the values in the
collection to sort them by. What else to call it? "Comparators" compare
two values, "hashes" don't need to provide information relevant to
ordering, and "indexes" are not directly related to the value at all.


Cheers,

Alan



More information about the Tutor mailing list