[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CASEQ doesn't do MEMQ
- To: GJC at MIT-MC
- Subject: CASEQ doesn't do MEMQ
- From: Kent M. Pitman <KMP at MIT-MC>
- Date: Sun, 5 Apr 81 17:04:00 GMT
- Cc: BUG-LISP at MIT-MC
- Original-date: 5 April 1981 12:04-EST
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))))))