![](https://secure.gravatar.com/avatar/5cd0acc03793e7944454dbb533bbfe43.jpg?s=120&d=mm&r=g)
25 Apr
2012
25 Apr
'12
12:30 p.m.
On 25 April 2012 12:15, Tobias C Rittweiler <tcr@freebits.de> wrote:
The cl-utilities library contains one function which cannot be found in alexandria that necessity pops up every now and then:
Returning the maximum (or minimum) element in a sequence with respect to an arbitrary calculation involving the elements.
I.e.
(elt (sort (copy-sequence <SEQUENCE>) #'< :key <FUNCTION>) 0) ; or #'>
except doing it more efficiently.
CL-UTILITIES calls this function EXTREMUM. (It also provides a couple of more functions along the lines to cover some edge cases.)
Pushed a version. Can you verify that it is what you wanted, and performs acceptably? Cheers, -- Nikodemus