[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Applying functions to all the symbols in a package...
For this reason, I am somewhat surprised, that CL has iterative functions for
fiddling with all they symbols in a package (i.e. DO-SYMBOLS and
DO-EXTERNAL-SYMBOLS but no equivalent MAP forms (e.g. the zetalisp MAPATOMS
and MAPATOMS-ALL). This is particularly surprising in light of the fact that
almost every other MAP function has equivalent iterations forms, and
I don't think this is true at all. The only pair of similar mapping/iteration functions
I can think of are mapc/dolist, and even there the correspondence isn't exact, since
dolist can't iterate over multiple lists in parallel. There's no mapping equivalent to
dotimes (nor do or do*, 'though I can't really envision such a thing, anyway), and no
iterative equivalent for map, the list mapping functions other than mapc (mapcar, maplist,
mapl, mapcan, and mapcon), nor maphash.
If you feel strongly about such things, and I suspect a lot of people do, perhaps a reasonable
thing to consider is how to automatically generate a mapping equivalent to an iterative function:
a sort of inverse loop macro. Some LetS constructs seem to have that sort of feel. Future
discussion of this should probably move to the iteration mailing list.