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

Issue: HASH-TABLE-PACKAGE-GENERATORS (version 5)



re: [fix final nits]

Ok, I'll do it.  I would also like to embellish the sample code for the
do-mumble-symbols guys to be more nearly workable.  What would you say to 
the following for DO-SYMBOLS?  [PARSE-BODY is as defined in Guy Steele's 
"Clarifications" of 6-Dec-85.]


(defmacro do-symbols ((var &optional (package `*package*) result-form)
                      &body body)
  (multiple-value-bind (body decls docstring) (parse-body body)
    `(with-package-iterator (next-symbol (list ,package)
                             :internal :external :inherited)
       (let (more? ,var)
         ,@decls
         (loop
           (unless (multiple-value-setq (more? ,var) (next-symbol))
             (return ,result-form))
           ,@body)))))
           

-- JonL --