[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: generalization of PUSH
- To: RWK at MIT-MC, JONL at MIT-MC
- Subject: Re: generalization of PUSH
- From: George J. Carrette <GJC at MIT-MC>
- Date: Sat ,13 Dec 80 16:10:00 EDT
- Cc: LISP-FORUM at MIT-MC
say that there was a GENERAL-PUSH macro, such that
(defmacro PUSH (C L) `(GENERAL-PUSH CONS ,C ,L))
;; As a matter of fact, it looks like you could trivialy
;; change NILCOM;SETF's definition of +INTERNAL-PUSH-X to
;; be general in this manner.
;; then I could define a favourite macro
(defmacro INC (X) `(GENERAL-PUSH PLUS 1 ,X))
;; It would be very nice to be able to do this,
;; since otherwise I have to
;; (1) Go through all the multiple-evaluation preventing hair
;; that you have already figured out.
;; (2) Do it wrong, possibly being screwed by multiple evaluations
;; at some later date.
p.s. POP is a candidate too, just by making CAR/CDR be
parameters. Together these would be nice for stack implementations
using arrays & other things.
I've got a hacked version of NILCOM;SETF on my dir,
and it works like a charm (in the compiler).