From: Matthias Felleisen (matthias at ccs.neu.edu) Date: Tue Nov 4 10:48:05 EST 2008 |
|
On Nov 4, 2008, at 10:39 AM, Jens Axel Soegaard wrote: > The obvious solution > > (define (readlines filename) > (call-with-input-file filename > (lambda (p) > (let loop () > (let ((line (read-line p))) > (if (eof-object? line) > '() > (cons line (loop)))))))) > > breaks on implementations with a small stack. I don't know what those implementations implement but it's certainly not Scheme :-)
Posted on the users mailing list. |
|