(use-modules (ice-9 match) (ice-9 rdelim)) (define (file-lines-match? file prefix) (with-input-from-file file (lambda () (catch 'found (lambda () (let loop () (match (read-line) ((? eof-object?) #false) (line (if (string-prefix? prefix line) (throw 'found) (loop)))))) (lambda _ #true)))))