From d66d6ee0896d0a6988853e3465e4475698a94b64 Mon Sep 17 00:00:00 2001 From: Kris Katterjohn Date: Sun, 10 Oct 2021 16:15:54 -0400 Subject: [PATCH] Use ARG-COUNT-CHECK to check the number of args to product This gives an error message that's consistent with other WNA errors. No problems with the test suite or share test suite. --- src/combin.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/combin.lisp b/src/combin.lisp index 4ef1a0234..5f6dbf545 100644 --- a/src/combin.lisp +++ b/src/combin.lisp @@ -1376,9 +1376,9 @@ ;; product routines (defmspec $product (l) + (arg-count-check 4 l) (setq l (cdr l)) - (cond ((not (= (length l) 4)) (merror (intl:gettext "product: expected exactly four arguments."))) - ((dosum (car l) (cadr l) (meval (caddr l)) (meval (cadddr l)) nil :evaluate-summand t)))) + (dosum (car l) (cadr l) (meval (caddr l)) (meval (cadddr l)) nil :evaluate-summand t)) (declare-top (special $ratsimpexpons)) -- 2.11.4.GIT