scsh-users
[Top] [All Lists]

Re: Code critique request

To: scsh-users@scsh.net
Subject: Re: Code critique request
From: Sean Winship <seanwinship@yahoo.com>
Date: Wed, 23 Jun 2004 20:44:29 +0000 (UTC)
List-id: <scsh-users.list-id.scsh.net>
Sender: news <news@sea.gmane.org>
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


<Prev in Thread] Current Thread [Next in Thread>