What is the best way to perform actions after a sequence terminates? Here is a simple example that is like in-lines, but takes a path instead of a port. It works, but I was wondering if there is a better way to do it.<br><br>
(define (in-file-lines path)<br> (let ((port (open-input-file path #:mode 'text)))<br> (make-do-sequence<br> (lambda ()<br> (values<br> (lambda (_) (read-line port 'any))<br> void<br> (void)<br>
void<br> (lambda _ (if (eof-object? (peek-byte port))<br> (begin<br> (close-input-port port)<br> #f)<br> #t))<br> void)))))<br>
<br>Thanks,<br>Doug<br>