An alternative if you don't like that would be having the maximum-finding function receive an additional comparator argument, similarly to qsort.
Yup, though one small thing: it's 'Schwartzian transform'[1] for Randal Schwartz.
[1] http://en.wikipedia.org/wiki/Schwartzian_transform
An alternative if you don't like that would be having the maximum-finding function receive an additional comparator argument, similarly to qsort.