|
From: | Tony Sidaway |
Subject: | [Chicken-users] Re: read-lines bug and a suggested bug fix |
Date: | Tue, 30 Jan 2007 17:09:05 +0000 |
On 1/30/07, Tony Sidaway <address@hidden> wrote:
Thus I suggest that the last line of the procedure (doread) above could be replaced by: ((if (eof-object? ln) (reverse lns)(or (eq? n 0)(reverse (cons ln lns)))))
Sorry that should be ((if (eof-object? ln) (reverse lns)(and (eq? n 0)(reverse (cons ln lns))))) The second reverse invocation must be evaluated only when n is 0.
[Prev in Thread] | Current Thread | [Next in Thread] |