OK, thank you, using a keyed table to store cached values would work in
this case.
I now have to admit that I was trying to use a concrete example to ask a
more general question about syntax extensions that cache values.
So I'm also curious if there's a way to solve this problem using a
hygienic macro, without using a table. Intuition says there should be
an easy way.
(I asked on plt-scheme list before comp.lang.scheme, since the answer
might be sensitive to the trickiness of evaluation phases, and MzScheme
seems to know phase separation well.)
--
http://www.neilvandyke.org/