[alexandria-devel] EXTREMUM
Nikodemus Siivola
nikodemus at random-state.net
Wed Apr 25 12:30:25 UTC 2012
On 25 April 2012 12:15, Tobias C Rittweiler <tcr at 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
More information about the alexandria-devel
mailing list