(define-module (scmvm) #:use-module (ice-9 ports) #:export (read-all-instructions instructions-from-file)) (define (read-all-instructions) (let ([inst (read)]) (if (eof-object? inst) '() (cons inst (read-all-instructions))))) (define (instructions-from-file file) (with-input-from-file file read-all-instructions))