[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue: HASH-TABLE-PACKAGE-GENERATORS (version 5)
- To: Jon L White <jonl@lucid.com>
- Subject: Issue: HASH-TABLE-PACKAGE-GENERATORS (version 5)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Wed, 30 Nov 88 20:26 EST
- Cc: cl-cleanup@sail.stanford.edu
- In-reply-to: <8812010044.AA04741@bhopal>
Date: Wed, 30 Nov 88 16:44:47 PST
From: Jon L White <jonl@lucid.com>
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.]
I don't see much advantage to adding more complexity to the macro when we're
trying to show what with-package-iterator does, not how to use parse-body
(which I don't think was ever accepted into Common Lisp anyway).
If you do go down this road, you're just going to have me complaining
that your macro doesn't take an &environment argument, and things of
that ilk. I'd rather keep it simple. However, you're writing the writeup,
so do whatever you want. I only am going to complain about things that
change the definition of Common Lisp, not stylistic details of the examples.
(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)))))