Commit d7c7fc6b authored by ram's avatar ram
Browse files

Fixed COUNT :TEST-NOT to actually negate the test.

parent 37eb7306
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/seq.lisp,v 1.14 1993/08/25 01:15:00 ram Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/seq.lisp,v 1.15 1993/11/02 16:12:54 ram Exp $")
;;; **********************************************************************
......@@ -2028,9 +2028,10 @@
((= index (the fixnum end)) count)
(declare (fixnum index count))
(if test-not
(if (funcall test-not ,item (apply-key key (aref ,sequence index)))
(unless (funcall test-not ,item
(apply-key key (aref ,sequence index)))
(setq count (1+ count)))
(if (funcall test ,item (apply-key key (aref ,sequence index)))
(when (funcall test ,item (apply-key key (aref ,sequence index)))
(setq count (1+ count))))))
(defmacro list-count (item sequence)
......@@ -2040,9 +2041,9 @@
((or (= index (the fixnum end)) (null sequence)) count)
(declare (fixnum index count))
(if test-not
(if (funcall test-not ,item (apply-key key (pop sequence)))
(unless (funcall test-not ,item (apply-key key (pop sequence)))
(setq count (1+ count)))
(if (funcall test ,item (apply-key key (pop sequence)))
(when (funcall test ,item (apply-key key (pop sequence)))
(setq count (1+ count))))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment