Fix incorrect parenthesis

This commit is contained in:
2024-09-10 23:05:14 -07:00
parent edd4f53a68
commit 2bdf936160
4 changed files with 60 additions and 26 deletions

View File

@ -29,6 +29,21 @@
(:documentation "Condition representing an error that occurred during
evaluation for a proposition."))
(defun operator-argument-count (oper)
"Return the minimum number of arguments that OPER takes as the first value,
and the maximum number (or nil for infinity) as a second value."
(case oper
(and (values 1 nil))
(or (values 1 nil))
(xor (values 1 nil))
(not (values 1 1))
(implies (values 2 2))
(converse (values 2 2))
(iff (values 2 2))
(nand (values 1 nil))
(nor (values 1 nil))
(t (error "unknown operator: ~S" oper))))
(defun logical-xor (&rest args)
"Logical xor (not equal) each argument in turn with its following argument.
NOTE: This is NOT a macro, there is no short circuit evaluation (all arguments