# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
(macrolet ((def (name comparison)
`(defun ,name (x &rest xs)
(dolist (y xs)
- (unless (,comparison x (car xs))
+ (when (,comparison y x)
(setq x y)))
x)))
(def max >)
(test (= (max 1) 1))
(test (= (max 1 2 3) 3))
(test (= (max 3 2 1) 3))
+(test (= (max 1 2 3 4 5) 5))
;;; MIN
(test (= (min 1) 1))
(test (= (min 1 2 3) 1))
(test (= (min 3 2 1) 1))
+(test (= (min 9 3 8 7 6 3 3) 3))
;;; EVENP
(test (evenp 2))