[plt-scheme] Iterating through days of the week

From: SpinyNorman (jmcaxolotl at gmail.com)
Date: Wed May 2 00:40:48 EDT 2007

I see that there is a standard way of getting date info such that
Sunday through Saturday are days 0 through 6.  I want to generate text
for a week's worth of days.  The part I am not clear on is how the
iteration should work.  I *think* the relevant control word is "do".
But of course, the HelpDesk isn't incredibly helpful when you search
for "do" -- it complains of too many matches.  "(do" gives too few.

While I was looking up "begin," I did see some pretty good doc on
"do," but it looks as if it allows for some very sophisticated
variations, whereas I need something really basic -- just count up
from zero, use the index for a calculation, and when you get to seven
(or after passing six), stop.  Also, some of the other functions used
in the "do" examples are not yet familiar to me.

Or should I use letrec?

Please feel free to point me at the appropriate place in the

Posted on the users mailing list.