[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CASEQ doesn't do MEMQ



Well, CASEQ has always been clearly defined to do this kind of error
checking -- insisting on a type-match between its first arg and the test
forms. The fact that Lisp happened not to detect errors in some cases is
just an implementational artifact.

I agree, though, that we could relax the definition to be more tolerant
of funny datatypes for CASEQ's first arg.

 ;; Assumed DATUM is received evaluated and clauses unevaluated.
 (DEFUN CASEQ-INTERPRETER (DATUM &REST CLAUSES)
   (IF (FIXNUM-TYPE-CASEQ? CLAUSES)
       (SAME-OLD-FIXNUM-CASEQ-INTERPRETER-AS-WE-ALWAYS-HAD DATUM CLAUSES)
       (IF (SYMBOLP DATUM)
	   (SAME-OLD-SYM-CASEQ-INTERPRETER-AS-WE-ALWAYS-HAD DATUM CLAUSES)
	   (INTERPRET-IMPLICIT-PROGN (CDR (ASSQ 'T CLAUSES))))))