[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: IF
- To: (BUG LISPM) at MIT-AI
- Subject: Re: IF
- From: AGRE@MIT-AI
- Date: Thu ,20 Jul 79 03:09:57 EDT
A suggestion: change the definition of IF so that
(IF TEST THEN ELSE ELSE ELSE)
becomes
(COND (TEST THEN) (T ELSE ELSE ELSE))
E.g.,
(DEFMACRO IF (TEST THEN . ELSES)
`(COND (,TEST ,THEN)
(T ,@ELSES)))
Note that this is compatible with the present definition of IF.
Another nice thing to have is IFNOT:
(DEFMACRO IFNOT (TEST . ELSES)
`(COND (,TEST) (T ,@ELSES))
that is, return this if it is non-NIL, otherwise do that stuff.
- Phil Agre
(I do the former myself but the "User is illegally redefining ... " queries
are pain.)