On 25 April 2012 15:30, Nikodemus Siivola <nikode...@random-state.net> wrote:
>> 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? So, what about the NO-EXTREMUM thing? I think it's good that the behaviour specified, instead of depending on the PREDICATE and REDUCE, but an an interface NO-EXTREMUM + CONTINUE is terrible: unless you handle the error right around the call site, it's pointless, since no-one higher up the call stack can know for sure where the error came from. At the call site it is overly verbose and inefficient: (handler-bind ((no-extremum #'continue)) (extremum ...)) I would much like to remove mention of the restart from the docstring, and add &KEY DEFAULT instead: (extremum ... :default nil) would provide the same behaviour as invoking CONTINUE. Since you obviously actually use this thing, any comments? Cheers, -- Nikodemus _______________________________________________ alexandria-devel mailing list alexandria-devel@common-lisp.net http://lists.common-lisp.net/cgi-bin/mailman/listinfo/alexandria-devel