[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Date: Tue, 11 May 1993 18:17 EDT
STACK-LET and the more primitive stack-consers don't seem to handle MAKE-LIST.
For something I'm doing, I am using forms like
(STACK-LET*((ARRAY (ZL:MAKE-ARRAY N :TYPE SYS:ART-Q-LIST))
(LIST (G-L-P ARRAY)))
Is there any cleaner way to do this sort of thing?
STACK-LET is driven off the entries in the alist
SI:*STACK-LET-OPERATIONS*. It uses this to translate function calls
into corresponding WITH-STACK-xxx bindings. Here's an addition that
does what you want.
(defmacro with-stack-make-list ((var size &key initial-element)
;; Use ,VAR for both bindings, so don't need a GENSYM!
`(stack-let* ((,var (zl:make-array ,size :type sys:art-q-list
(,var (g-l-p ,var)))
(eval-when (compile load eval)
(pushnew '(make-list 1 nil with-stack-make-list)
si:*stack-let-operations* :key #'car))
- From: email@example.com