2025-06-11 10:50:38 -05:00
|
|
|
(define-module (scmvm)
|
|
|
|
|
#:use-module (ice-9 ports)
|
2025-08-28 13:02:37 -05:00
|
|
|
#:export (read-all-instructions
|
|
|
|
|
instructions-from-file))
|
2025-06-09 09:02:20 -05:00
|
|
|
|
2025-06-11 10:50:38 -05:00
|
|
|
(define (read-all-instructions)
|
|
|
|
|
(let ([inst (read)])
|
|
|
|
|
(if (eof-object? inst)
|
|
|
|
|
'()
|
|
|
|
|
(cons inst (read-all-instructions)))))
|
2025-06-09 09:02:20 -05:00
|
|
|
|
2025-06-11 10:50:38 -05:00
|
|
|
(define (instructions-from-file file)
|
|
|
|
|
(with-input-from-file file read-all-instructions))
|