tweak EXTREMUM
commit0c39310ebc2de5543157e6b862e909036b39d936
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 26 Apr 2012 09:01:35 +0000 (26 12:01 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 26 Apr 2012 09:01:35 +0000 (26 12:01 +0300)
tree0a21bf980f6c65f0626af18660ac4009247f7abd
parent34488223ff5b7eb19d73075481c91f829af5d6bd
tweak EXTREMUM

 Return NIL if the sequence is empty, instead of the NO-EXTREMUM nonsense.

 It was bad design, because it's not an error someone higher up the stack can
 sensibly handle, and handling it locally is too verbose and slow.

    (or (extremum ...) (error ...))

 expresses the common case succintly, and fits the pattern of existing
 sequence functions.

 If it is deemed necessary, we can also add &KEY DEFAULT, but that seems
 overkill and has little precedent in sequence functions.
package.lisp
sequences.lisp
tests.lisp