Martin Gasbichler <gasbichl <at> informatik.uni-tuebingen.de> writes:
> Yes, the use of SET! in COUNT-RECENT-FILES is the only thing that
> looks a little bit odd. Mutating local variables should be avoided
> whenever possible as it makes the code much harder to understand.
Thanks, this is the kind of critique I was hoping for.
> I'd rewrite the function as follows (untested)
Thanks for this as well, I'll play around with it.
> A slightly more advanced version uses FOLD-RIGHT from SRFI-1 (BTW: I'd
> recommend to use srfi-1 instead of list-lib).
Is srfi-1 newer or more standard than list-lib? In any case, I appreciate
the assistance.
Sincerely,
Sean
|