[alexandria-devel] EXTREMUM
Tobias C Rittweiler
tcr at freebits.de
Wed Apr 25 09:15:59 UTC 2012
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.)
The code can be found here:
http://common-lisp.net/viewvc/cl-utilities/cl-utilities/extremum.lisp?rev
ision=1.10&view=markup
As the code is Public Domain, it could just be moved as is.
I find no other use of cl-utilities and would like to see it
become entirely obsolete.
T
More information about the alexandria-devel
mailing list