From 2d6c072b47a72f9152b2d43d0ffa42f413f15713 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sun, 24 Jul 2016 00:26:20 +0200 Subject: utils: for-each-file: Use named let. * src/mcron/utils.scm (for-each-file): Use named 'let' instead of 'do'. --- src/mcron/utils.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mcron/utils.scm b/src/mcron/utils.scm index 7b29971..ce2610c 100644 --- a/src/mcron/utils.scm +++ b/src/mcron/utils.scm @@ -92,9 +92,12 @@ General help using GNU software: \n" PROC must be a procedure that take one file name argument. The return value is not specified" (let ((dir (opendir directory))) - (do ((file-name (readdir dir) (readdir dir))) - ((eof-object? file-name) (closedir dir)) - (proc file-name)))) + (let loop ((file-name (readdir dir))) + (if (eof-object? file-name) + (closedir dir) + (begin + (proc file-name) + (loop (readdir dir))))))) (define (process-update-request fdes-list) "Read a user name from the socket, dealing with the /etc/crontab special -- cgit v1.2.3